#include <LiquidCrystal.h>
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 10, 11, 12, 13); // put your pin numbers here
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
lcd.clear(); // Clear the screen
}
void loop() {
// Turn off the display:
lcd.noDisplay();
delay(1000);
// Turn on the display:
lcd.display();
// Print a message to the LCD.
lcd.print("hello, world!");
delay(5000);
}
but no luck just white boxes, tired all kind of wirings and code but nothing so far.
If your wiring is as described in the message, your constructor would be:
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 13, 12, 11, 10); // put your pin numbers here
Your wiring is up to you. Quite honestly, life is easier when the wires are in the same order as the Uno pins. e.g. 7, 8, nc, 10, 11, 12, 13 (just like in your original constructor)
david_prentice:
If your wiring is as described in the message, your constructor would be:
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 13, 12, 11, 10); // put your pin numbers here
Your wiring is up to you. Quite honestly, life is easier when the wires are in the same order as the Uno pins. e.g. 7, 8, nc, 10, 11, 12, 13 (just like in your original constructor)
If in doubt, copy the example wiring exactly.
David.
thanks for the replay.
tried changing the constructor still white squares, any other advice?
david_prentice:
Yes, post a clear photo of your wiring.
Note that breadboards and wires can be broken internally. Check with DMM.
Soldered joints may be soldered badly.
David.
I think I'll try re soldering the headers, since I don't have a DMM at hand.
I doubt the breadboard or wires a faulty since they are brand new, and I have rechecked my wiring a lot, is there a way to recognize a defected display?
Most items arrive in full working order (if sensibly packed).
If you don't have a DMM, just replace one jumper wire at a time. Or test each wire with an LED and resistor. e.g. put LED and resistor on breadboard. Test each wire by connecting LED to 5V via your wire.
I had a similar problem but I was able to see the text behind the white squares. For me adjusting the potentiometer at the back of the I2C board helped. Did you try that ?
Not all LCD are created equal, I would get a variable resistor and try it. One leg to GND, other leg to 5v, and middle leg (wiper) to pin 3 of the LCD and play around it a bit. It is possible you can't see the text because the contrast is too high causing all blocks to be visible.
david_prentice:
Most items arrive in full working order (if sensibly packed).
If you don't have a DMM, just replace one jumper wire at a time. Or test each wire with an LED and resistor. e.g. put LED and resistor on breadboard. Test each wire by connecting LED to 5V via your wire.
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.pr