#include <LiquidCrystal.h>
LiquidCrystal lcd(2,4, 8, 9, 10, 11);
void setup() {
// put your setup code here, to run once:
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.print("Hello");
}
void loop() {
// put your main code here, to run repeatedly:
}
Unfortunately the display isn´t showing anything. I don´t really know what´s wrong. Hopefully you can help me.
Can you tell which datasheet that is ?
Which display is it ? Most LCD displays are for 5V boards, such as a Arduino Uno.
I think that there should be a potentiometer or a resistor to control the contrast.
It is an error in the datasheet. The pot is shown in the connection diagram for raspberry pi, but not shown in the connection diagram for Arduino. The pot is always required.
Well you are not in a very good position to do anything with Arduinox or displays then, are you?
Just to start with, connect pin 3 on the display ("Vo") to ground. You should get a display. Later, you will want a 1k (not a 10k) potentiometer to connect one end to ground and the wiper to "Vo" to adjust the contrast.
Or just as readily, get a multi-resistor pack which should only be a few dollars and try a few values such 120, 220, 330, 470, 680 or 1k Ohms between "Vo" and ground.
I might just add that the idea of connecting "Vo", pin 3 of the display to PWM "pin 3" on the Arduino is a rather stupid idea someone had to "imitate" a potentiometer. It never works - except when you set the PWM value to zero and the pin is thereby effectively grounded in a rather silly fashion.