A
A
AlexSrc2020-09-26 13:47:55
Arduino
AlexSrc, 2020-09-26 13:47:55

LED display does not display anything, what should I do?

I just bought an Arduino, tried to connect it using examples on the Internet, but the screen does not display anything
Photo:
5f6f1ba4ccb2a382561681.jpeg
Code from examples from the Arduino IDE

#include <LiquidCrystal.h>
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  lcd.begin(16, 2);
  lcd.print("hello, world!");
}

void loop() {
  lcd.setCursor(0, 1);
  lcd.print(millis() / 1000);
}

Connected like this:
lcd-1602-and-arduino-3.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kalapanga, 2020-09-26
@AlexSrc

The picture shows a display connected via an I2C module. And your sketch is for a directly connected display. The library for a display like yours is usually called LiquidCrystal_I2C. Well, look at examples from her. You may also need the "I2C Scanner" sketch (easily found with google) to find out the I2C address of your display if it doesn't work right away. Well, when you connect a display with the correct library and sketch, you may need to turn the contrast potentiometer on it - by chance it can be turned to the minimum, and you will not see anything, even with the correct connection.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question