I know there's probably a simple answer. I am stumbling through trying to just run the hello world example on an LCD display. I've got backlight on. Everything uploads. Nothing shows up. I've used 0x27 as the address. I've ran the scanner for the address and it comes up with a whole list of numbers. What am I doing wrong here???
you showing no list of numbers here.
Here is a list of addresses.
Look at the back of the lcd at i2c board, look at the a1 a2 a3 locations, those are either a 1 (open, no zero ohm resistor) or 0 (closed, zero ohm resistor is installed). Depending on your ic on that board
here is a list of addresses.
PCF8574_ADDR_A21_A11_A01 = 0x27, //i2c address A2 = 1, A1 = 1, A0 = 1 (by default)
PCF8574_ADDR_A21_A11_A00 = 0x26, //i2c address A2 = 1, A1 = 1, A0 = 0
PCF8574_ADDR_A21_A10_A01 = 0x25, //i2c address A2 = 1, A1 = 0, A0 = 1
PCF8574_ADDR_A21_A10_A00 = 0x24, //i2c address A2 = 1, A1 = 0, A0 = 0
PCF8574_ADDR_A20_A11_A01 = 0x23, //i2c address A2 = 0, A1 = 1, A0 = 1
PCF8574_ADDR_A20_A11_A00 = 0x22, //i2c address A2 = 0, A1 = 1, A0 = 0
PCF8574_ADDR_A20_A10_A01 = 0x21, //i2c address A2 = 0, A1 = 0, A0 = 1
PCF8574_ADDR_A20_A10_A00 = 0x20, //i2c address A2 = 0, A1 = 0, A0 = 0
PCF8574A_ADDR_A21_A11_A01 = 0x3F, //i2c address A2 = 1, A1 = 1, A0 = 1
PCF8574A_ADDR_A21_A11_A00 = 0x3E, //i2c address A2 = 1, A1 = 1, A0 = 0
PCF8574A_ADDR_A21_A10_A01 = 0x3D, //i2c address A2 = 1, A1 = 0, A0 = 1
PCF8574A_ADDR_A21_A10_A00 = 0x3C, //i2c address A2 = 1, A1 = 0, A0 = 0
PCF8574A_ADDR_A20_A11_A01 = 0x3B, //i2c address A2 = 0, A1 = 1, A0 = 1
PCF8574A_ADDR_A20_A11_A00 = 0x3A, //i2c address A2 = 0, A1 = 1, A0 = 0
PCF8574A_ADDR_A20_A10_A01 = 0x39, //i2c address A2 = 0, A1 = 0, A0 = 1
PCF8574A_ADDR_A20_A10_A00 = 0x38 //i2c address A2 = 0, A1 = 0, A0 = 0
Yep them are the correct addresses. what did the scanner show, it should be only one of the list. Hint if the scanner does not show the address it will not work. If that happens post an annotated schematic of exactly how you have wired it showing all connections. Be sure to include power, ground and power sources.
Hello charmedone07
We need some additional information.
Post your sketch, well formated, with well-tempered comments and in so called
code tags "< code >" and a detailed circuit diagram to see how we can help.
Have a nice day and enjoy coding in C++.
You need the exact library for your display.
SO we need to know exactly what hardware you are using
by a link to where it came from
and how its connected
I have adjusted the headline and moved the query to a better section of the forum.
Which display are you using -> please post a link to the product you have bought.
Which addresses were found by the scanner?
Is it an I2C LCD?
How did you connect it?
How did you power it?
Please, post a picture of your LCD.
Apologies for no response for so long. Between family illness and being landfall for a hurricane, I finally got to pull all this stuff out of storage and start over.
Since my first post I did accomplish the Hello World once. And then it disappeared and I've had blocks on the LCD since. I have ran sketches from the library and wrote my own. I can get it to upload and show in the serial monitor but never on the LCD.
Below is the code I'm using that uploads and shows in the serial monitor:
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Hello, World!");
}
I'm using an Arduino UnoR3, I've tried 4 different 1602 LCDs with l2c. I replaced all wiring from the Arduino to the LCD and USB to my computer just in case something wasn't working right.
I uploaded the diagram of wiring and real picture.
It's the basic SCL-A5, SDA-A4, GRD-GRD, VCC-5V.
If it worked once, and you didn't change the code since, maybe it's either a bad wire, bad connection, or poor solder joint?
I did actually change the code and then went back to the same on that worked and then tried several from libraries. I changed all the wiring out. And I'm on the 4th LCD with a 4th different l2c. I'm literally at a loss now.
FYI... JHD162A
Like already advised to clearify in August:
Which address shows the I2C Scanner?
When you have confirmed your i2c address you can use my LCD library:
https://werner.rothschopf.net/202009_arduino_liquid_crystal_i2c_en.htm
Try to Use the hd44780 - Arduino Reference library
It will detect the address
You did try adjusting the contrast potentiometer, correct?
Otherwise, I'm starting to think one or both of your I2C pins is cooked, possibly damaged after your successful event. That, or you've a flaky connector/solder joint on the UNO board contributing random events.
Have you recently tried the simple 'blink' code, to rule out basic board problems?
It's unlikely, but I've had to do that a couple of times as a sanity check when things got frustrating.
0x27. Sorry I left out that piece of info.
I adjust the contrast both ways multiple times. The real kicker is this is the second board. The first board I never got past the blocks. The second board I got one successful display. I have not tried the 'blink' code. I will when I get home.
I will try this when I get home today.