Can you please help me with an issue that I have recently?
I used a 20x4 LCD display with i2c on a Arduino Uno and programmed the code for it.
It worked like a charm, for a couple of hours and after powering it off and on a couple of times the display wound display the text and numbers anymore.
This is what I did to figure out what the problem is:
*New display and new i2c
*re-programmed the code and upload the same code to the Arduino.
*New cables (shorter )
*Solderd the cables directly to the i2c and the the pins that will fit in the Ardruino.
Nothing worked out.
Solution: New Arduino Uno
Same story: Worked for a couple of times and after 30 minutes it stopped working after swithing it all off and on.
:o
Again:
*New display and new i2c
*re-programmed the code and upload the same code to the Arduino.
*New cables (shorter )
*Solderd the cables directly to the i2c and the the pins that will fit in the Ardruino.
This really freaks me out, there is no short circuit I know for sure.
Is it possible that my wires are too long?
I used about 1 meter of cable, can the resistance couse the Arduino to fail?
Fact: the code works and I am sure that a other Arduino will fix the problem again ( for a couple of minutes but I need something that will work for a long period.
Does the old one still work with example sketches such as Blink ?
What does your program do ? What pins does it use and what for ? What, if anything, is it connected to apart from the LCD ? Post it here for comment.
Run this with the LCD connected and post the results here
// --------------------------------------
// i2c_scanner
//
// Version 1
// This program (or code that looks like it)
// can be found in many places.
// For example on the Arduino.cc forum.
// The original author is not know.
// Version 2, Juni 2012, Using Arduino 1.0.1
// Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26 2013
// V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
// by Arduino.cc user Krodal.
// Changes by louarnold removed.
// Scanning addresses changed from 0...127 to 1...119,
// according to the i2c scanner by Nick Gammon
// http://www.gammon.com.au/forum/?id=10896
// Version 5, March 28, 2013
// As version 4, but address scans now to 127.
// A sensor seems to use address 120.
//
//
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
//
#include <Wire.h>
void setup()
{
Wire.begin();
Serial.begin(115200);
Serial.println("\nI2C Scanner");
}
void loop()
{
byte error, address;
int nDevices;
Serial.println("Scanning...");
nDevices = 0;
for(address = 1; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0)
{
Serial.print("I2C device found at address 0x");
if (address<16)
Serial.print("0");
Serial.print(address,HEX);
Serial.println(" !");
nDevices++;
}
else if (error==4)
{
Serial.print("Unknow error at address 0x");
if (address<16)
Serial.print("0");
Serial.println(address,HEX);
}
}
if (nDevices == 0)
Serial.println("No I2C devices found\n");
else
Serial.println("done\n");
delay(5000); // wait 5 seconds for next scan
}
I am speechless, came home today ( did send the question during work ) and give it a try again.
On the second arduino, first display and original wires, worked.
Off/on, 30 times… removing cables and did a reflash the code… still working
First Arduino is shipped back, that one didn’t work for sure
Long story short: it works and I can’t get it to fail again.
I have bad karma, please remove the post.
Thanks, many thanks for the help and the suggestions.