LCD screen = TV static, see post 24-evolving problem

Hi! PLEASE ANY SUGGESTIONS I am trying to make a small video appear on a 2inch LCD screen and I need some help fixing it.

This is my set up:
pins as follows:
VCC -> 5V
GND -> GND
(MOSI) DIN -> D7
(MISO) CLK -> D6
CS -> D8
DC -> D3
RST -> D4
BL -> NOT CONNECTED

this is my lcd screen:
Amazon.com: waveshare General 2inch IPS LCD Display Module 240×320 Resolution 2.0inch Monitor Embedded Controller RGB, 262K Color Display Color LED Backlight ST7789 Driver SPI Interface : Electronics

and this is my code:

#include <TFT_eSPI.h> // Install this library via Arduino Library Manager

// Define pins
#define TFT_CS    D8
#define TFT_DC    D3
#define TFT_RST   D4

TFT_eSPI tft = TFT_eSPI(); // Create TFT object

void setup() {
  tft.init(); // Initialize TFT display
  tft.setRotation(1); // Set display rotation (0, 1, 2, or 3)

  // Fill screen with a color (optional)
  tft.fillScreen(TFT_BLACK);

  // Display the file path
  tft.setTextSize(2);
  tft.setTextColor(TFT_WHITE);
  tft.setCursor(10, 50);
  tft.println("Video File Path:");
  tft.setCursor(10, 80);
  tft.println("/path/to/your/video.mp4"); // Replace with your actual file path
}

void loop() {
  // Your main code here (if needed)
}

Also to be clear, it's saying:
Sketch uses 34824 bytes (107%) of program storage space. Maximum is 32256 bytes.
Global variables use 294 bytes (14%) of dynamic memory, leaving 1754 bytes for local variables. Maximum is 2048 bytes.

Which board are you compiling for, and is that board set correctly in the IDE?

I'm using Arduino Uno R3 and I am pretty sure it's set correctly

I get a similar report on my Nano (113%). I suppose the library file is meant for MEGA or ESP32

Sketch uses 34824 bytes (113%) of program storage space. Maximum is 30720 bytes.
Global variables use 294 bytes (14%) of dynamic memory, leaving 1754 bytes for local variables. Maximum is 2048 bytes.
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
text section exceeds available space in board

The library assumes something with large memory...

[...cut]TFT_eSPI\Extensions/Smooth_font.cpp:327:40: warning: left shift count >= width of type [-Wshift-count-overflow]
     val  = pgm_read_byte(fontPtr++) << 24;

Ohh okay so should I buy a mega?
I'm going to try attaching multiple screens at some point so I assume I'll need a lot more memory.

No. You should find what you need. If you can use a different library (there are plenty that fit in a Nano/Uno), that would be good. It all depends on your needs.

Okay I changed libraries and my new code is:

#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>

// Define pins
#define TFT_CS    8
#define TFT_DC    3
#define TFT_RST   4

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);

void setup() {
  tft.initR(INITR_BLACKTAB); // Initialize TFT display
  tft.setRotation(1); // Set display rotation (0, 1, 2, or 3)

  // Fill screen with a color (optional)
  tft.fillScreen(ST7735_BLACK);

  // Display the file path
  tft.setTextSize(2);
  tft.setTextColor(ST7735_WHITE);
  tft.setCursor(10, 50);
  tft.println("Video File Path:");
  tft.setCursor(10, 80);
  tft.println("Users\\14155\\Desktop\\RSSET.mov"); // Replace with your actual file path
}

void loop() {
  // Your main code here (if needed)
}

It's uploading which is a big step in the right direction!! (thank you)
but.. the screen is just showing black.
any ideas?

it was also recommended to me that I move the BL pin to 3.3v and the VCC to 5v

When you installed the library, it created an example folder. In your IDE >> FILES >> EXAMPLES >> ADAFRUIT ST77XX >> (some example). See how the examples set up the TFT and do their graphics or text.

I tried that and it ended up showing a lot of errors but I will try again later tonight

Posting the errors will help.

You started another topic of the same subject. That tells me that I am no longer needed.

it was a new problem so I started a new more accurate post sorry

Hi! this is kind of an evolution of an old post because it was no longer in the right category..

My screen is just showing black and I can't figure out how to fix it! please help- any suggestions are welcome but I don't have a Potentiometer

I have the following LCD screen:
Amazon.com: waveshare General 2inch IPS LCD Display Module 240×320 Resolution 2.0inch Monitor Embedded Controller RGB, 262K Color Display Color LED Backlight ST7789 Driver SPI Interface : Electronics

and I am using the Aruino egloo uno R3

my pins are:
VCC -> 5V
GND -> GND
(MOSI) DIN -> D7
(MISO) CLK -> D6
CS -> D8
DC -> D3
RST -> D4
BL -> 3.3V

and my code is:

#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>

// Define pins
#define TFT_CS    8
#define TFT_DC    3
#define TFT_RST   4

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);

void setup() {
  tft.initR(INITR_BLACKTAB); // Initialize TFT display
  tft.setRotation(1); // Set display rotation (0, 1, 2, or 3)

  // Fill screen with a color (optional)
  tft.fillScreen(ST7735_BLACK);

  // Display the file path
  tft.setTextSize(2);
  tft.setTextColor(ST7735_WHITE);
  tft.setCursor(10, 50);
  tft.println("Video File Path:");
  tft.setCursor(10, 80);
  tft.println("Users\\14155\\Desktop\\RSSET.mov"); // Replace with your actual file path
}

void loop() {
  // Your main code here (if needed)
}
1 Like

Suggest using the correct library for the LCD driver.
ie: ST7789 NOT <Adafruit_ST7735.h> and follow the pin setup as per the data in the linked information.

Okay I will try- the library that I originally used was too big for the board so it was recommended that I try this one

Wire and use as per the library examples first , then you’ll know if you have a hardware issue .
Use you boards default SPI connections

So it's kind of cross-posting, which is kind of against forum rules....

Topics can be moved between categories. Just ask.

Okay using the examples I've gotten pretty far.
But, the screen is just showing like basically TV static. It was showing the example drawings well but I can't get it to corporate with my image path.
I've been trying to teach myself so sorry if I am going about this very wrong.

This is my new code:

#include <SPI.h>
#include "LCD_Driver.h"
#include "GUI_Paint.h"
#include "image.h"

void setup()
{
  Config_Init();
  LCD_Init();


  

  Paint_DrawImage("Users\14155\Desktop\digole sun.bin",1, 1, LCD_WIDTH, LCD_HEIGHT); 
  //Paint_DrawFloatNum (5, 150 ,987.654321,4,  &Font20,    WHITE,   LIGHTGREEN);

  Serial.println("Debug message");

}
void loop()
{
  
}