I'm trying to use this lib with a mini pro in order to get data from a serial device and display them on the lcd.
But until now no success at all. I can't display any data ( chars/strings ) on the lcd so far, even with array filled from serial.read. The array seem to be filled with garbage, not the data that the device send..
My code:
void loop() {
graphic.setCoordinate(2,40);
if (Serial.available())
{
delay(200);
while (Serial.available() > 0)
{
char inChar = (char)Serial.read();
graphic.print(inChar);
}
}
This code, and some variations work fine with a 1100/3310 nokia lcd and 1602 lcd with LiquidCrystal.
Have you tried something even simpler, like one of the example programs from the gLCD library?
I tried all 3 examples form the lib, all working fine : BasicFunctions, ImageRotation, TestPattern.
This would show whether you have a display-related problem or a serial-related one.
Regards
Ray
I tested the serial device and arduino with a 1602 lcd, with same code after got this issue, but it works, I can send data to the lcds. So my device and the arduino are working fine.
My concern is a sort of compatibility with wire.h lib, and this specific lib to control the lcd.
So, to summarise, your program that reads data from serial port and prints to display works with other displays, but not with the 6100. And the 6100 with the example programs does work. Have I got that right? And all these tests are on the Pro Mini?
My concern is a sort of compatibility with wire.h lib, and this specific lib to control the lcd.
Serial and wire should not interfere with each other.
Could you please post your complete program and a drawing of how you have your hardware connected.
Hackscribble:
Could you please post your complete program and a drawing of how you have your hardware connected.
Thanks
Hi.
You saved my day Ray.
I was posting code and schematic of connection, and connection parameter from the serial device when I discover a small but critical missing point, in my code was not defined Serial.begin(9600) in my other working code with other lcd, this parameter is present.
I tested same code adding serial.begin(9600), and voila... got it working