Hello, I have a problem trying to show text on my LCD.
I have already tested several ways to show and several codes but it always shows strange characters. Sometimes I even get it right in one letter or another, but I never got it to show that the text is all correct.
I have already checked the panel welds and none of them appear to be shorted.
type or paste code here
//Carrega a biblioteca LiquidCrystal
#include <LiquidCrystal.h>
//Define os pinos que serão utilizados para ligação ao display
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
//LiquidCrystal lcd (2,3,4,5,11,12);
void setup()
{
//Define o número de colunas e linhas do LCD
lcd.begin(16, 2);
}
void loop()
{
//Limpa a tela
lcd.clear();
//Posiciona o cursor na coluna 3, linha 0;
lcd.setCursor(3, 0);
//Envia o texto entre aspas para o LCD
lcd.print("FILIPEFLOP");
lcd.setCursor(3, 1);
lcd.print(" LCD 16x2");
delay(5000);
//Rolagem para a esquerda
for (int posicao = 0; posicao < 3; posicao++)
{
lcd.scrollDisplayLeft();
delay(300);
}
//Rolagem para a direita
for (int posicao = 0; posicao < 6; posicao++)
{
lcd.scrollDisplayRight();
delay(300);
}
}
as your pictures don't show the wiring, the only guess is:
the wiring is not correct.
Todo: double check your wiring.
After your check and correction, make a table which pin is used for what and which wire color is used and upload pictures were we can clearly see each and every connection. Use different colors to make the routing visible.
Example
LCD_PIN ARDUINO_PIN COLOR
E 42 white
if we get a correct table and good pictures, one will be able to help you.
But for 99% probability, you will find the mistake on your own during the preparation of good information.
the GND connection is made through Breadboard. I have chain in it (third photo).
The colors of the wires were the wires that came to me, but I sent the table for each connection where it is connected.
fine.
Then we can talk about something different: you don't need to connect the contrast potentiometer to VDD. Connect both ends to GND and the wiper to the LCD-V0