I had my temperature displaying on the lcd and added the analog read photo resistor reading, it worked fine, I then connected the uno to an external voltage source and the display does not work, it will blink when the program initiates but when the temp is ready there are no characters showing on the lcd. It worked and now it does not. what could have happened, I checked the wiring and can't get it to display. When I was setting it up Display World worked and now it does not work either.
Carl Swanson
i2c 16x4 lcd display adifruit
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88091
- Joined: Sat Feb 07, 2009 10:11 am
Re: i2c 16x4 lcd display adifruit
What are you using for a power supply? Am I correct in assuming it was running on USB power before?
If you post some photos of your setup we might be able to spot the problem.
If you post some photos of your setup we might be able to spot the problem.
- carlswanson60
- Posts: 60
- Joined: Tue Nov 26, 2013 1:28 pm
Re: i2c 16x4 lcd display adifruit
I started with USB and moved to 12v power supply, it worked until I moved it and now wont work,
I took a photo of my setup but it won't upload, how can I get the photo to you?
Here is the code;
I took a photo of my setup but it won't upload, how can I get the photo to you?
Here is the code;
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define BACKLIGHT_PIN 13
//temperature sensor
/*
* seeing_light.pde
* -----------------
* Reading a simple LDR
* and printing the result.
*
* http://spacetinkerer.blogspot.com
*/
// set the LCD address to 0x27 for a 20 chars 4 line display
// Set the pins on the I2C chip used for LCD connections:
// addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address
int backLight = 13; // pin 13 will control the backlight
int photocellPin = 0; // the cell and 10K pulldown are connected to a0
int photocellReading; // the analog reading from the sensor divider
int LEDpin = 11; // connect Red LED to pin 11 (PWM pin)
int LEDbrightness; //
long randNumber;
int gndPin = A1;
int sensePin = A2;
int plusPin = A3;
void setup ()
{
pinMode(gndPin, OUTPUT);
digitalWrite(gndPin, LOW);
pinMode(plusPin, OUTPUT);
digitalWrite(plusPin, HIGH);
Serial.begin(9600);
pinMode(backLight, OUTPUT);
digitalWrite(backLight, LOW); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
lcd.begin(20,4); // initialize the lcd for 20 chars 4 lines, turn on backlight
lcd.backlight();
// Print a message to the LCD.
//lcd.setCursor(0, 0);
lcd.print("KILL");
// ------- Quick 3 blinks of backlight -------------
for(int i = 0; i< 3; i++)
{
lcd.backlight();
delay(250);
lcd.noBacklight();
delay(250);
}
lcd.backlight(); // finish with backlight on
}
void loop ()
{
int raw = analogRead(sensePin);
float volts = raw / 205.0;
float tempC = 100.0 * volts - 50;
float tempF = tempC * 9.0 / 5.0 + 32;
Serial.print(tempC);
Serial.print(" C ");
lcd.setCursor(0,1);
lcd.print("Temp in C ");
lcd.print(tempC);
lcd.setCursor(0,2);
lcd.print("Temp in F ");
lcd.print(tempF);
lcd.print(0,2);
lcd.print(" Lumes ");
lcd.print(analogRead(0),DEC);
Serial.print(tempF);
Serial.println(" F");
Serial.println(analogRead(0),DEC);
delay(5000);
photocellReading = analogRead(photocellPin);
Serial.print("Analog reading = ");
Serial.println(photocellReading); // the raw analog reading
// LED gets brighter the darker it is at the sensor
// that means we have to -invert- the reading from 0-1023 back to 1023-0
photocellReading = 1023 - photocellReading;
//now we have to map 0-1023 to 0-255 since thats the range analogWrite uses
LEDbrightness = map(photocellReading, 0, 1023, 0, 255);
analogWrite(LEDpin, LEDbrightness);
delay(100);
}
- adafruit_support_bill
- Posts: 88091
- Joined: Sat Feb 07, 2009 10:11 am
Re: i2c 16x4 lcd display adifruit
To upload a photo, use the "upload attachment tab under the edit window. There is a 1 meg maximum size. If you resize to about 800x600 you should have no problem.
- carlswanson60
- Posts: 60
- Joined: Tue Nov 26, 2013 1:28 pm
Re: i2c 16x4 lcd display adifruit
Here ya go.
- Attachments
-
- Photo of setup
- templcd.JPG (923.91 KiB) Viewed 1394 times
- adafruit_support_bill
- Posts: 88091
- Joined: Sat Feb 07, 2009 10:11 am
Re: i2c 16x4 lcd display adifruit
I can't really see where all those wires go. Do you have a common ground connection from the Arduino to the display/backpack? Is the backlight on the display lighting up?
- carlswanson60
- Posts: 60
- Joined: Tue Nov 26, 2013 1:28 pm
Re: i2c 16x4 lcd display adifruit
The backlight on the display works, the display show two lines of lighter color boxes across the display. I use a4 and a5 for the display. It worked this way originally. Do these lcds burn out? If so how?
Carl
Carl
- adafruit_support_bill
- Posts: 88091
- Joined: Sat Feb 07, 2009 10:11 am
Re: i2c 16x4 lcd display adifruit
It is not a common occurrence, but it is possible to damage the display or the backpack in a few different ways.Do these lcds burn out? If so how?
1 - Overvoltage - as in accidentally connecting it to the wrong power supply.
2 - Reverse voltage - accidentally swapping power and ground connections.
3 - Applying power and/or signal without a ground connection.
3 - Static discharge - always a danger during the winter months. Components not connected to a circuit are more vulnerable to this type of damage.
It is also possible that you have an intermittent connection between the backpack and the display. These sometimes work for a while then quit. If you post some clear photos of the soldering on the front and back we'll check for any signs of that.
- carlswanson60
- Posts: 60
- Joined: Tue Nov 26, 2013 1:28 pm
Re: i2c 16x4 lcd display adifruit
I checked the soldering with a loop 10X to be correct. I don't see any issues with the soldering. Like I said it worked fine for a while. I think I'll just throw this mess away and not use lcds if they are that delicate. This is the second one I got from you and the first one does not even light up the backlight. Guess I can find something at Sparkfun.
- pellico
- Posts: 31
- Joined: Thu Aug 15, 2013 6:20 pm
Re: i2c 16x4 lcd display adifruit
I looked at the picture and don't see any external power supply connected so it is really tough to say what happened. I've used quite a few LCD displays from Adafruit without any issues. What I didn't see verified is if the Arduino still works, ie does the blink LED sketch upload and run? Troubleshooting starts with determining what still works and work towards what doesn't work.
Please be positive and constructive with your questions and comments.