I have a problem getting a 16 x 2 LCD display to show anything from any sketch I upload to my Arduino Uno . All I get is a blue screen with no text. Which section should I post this with more deteials.
Thanks
I have a problem getting a 16 x 2 LCD display to show anything from any sketch I upload to my Arduino Uno . All I get is a blue screen with no text. Which section should I post this with more deteials.
Thanks
If the library example does not run properly, you have a wiring and/or component problem.
I have moved the topic to the Displays section
Please post your sketch and a schematic of your project
Has the LCD module got a potentiometer on the back to adjust its brightness ?
Yes it has, but I'll go to the display section now thanks.
Last year I placed a 16 x2 lcd on a breadboard and connected it to a Arduino Uno.
That works without problem.
Now I wanted to do the same thing with another / different sketch. After connecting the LCD up to the relevant pins on the Arduino and uploaded the sketch, the LCD was just a blue screen. I connected a 10 pot to pin 3 on the lcd, but that didn't help.
I have tried 2 different lcd displays and 3 different breadboards, but still no text showing on the lcd.
Now I have connected the LCD direct to the arduino, and when adjusting the 10k pot, I now get weird characters on the display.
Sketch below:
#include <Wire.h>
#include<EEPROM.h>
#include <RTClib.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
RTC_DS1307 RTC;
int temp,inc,hours1,minut,add=11;
int next=10;
int INC=9;
int set_mad=8;
#define buzzer 13
int HOUR,MINUT,SECOND;
void setup()
{
Wire.begin();
RTC.begin();
lcd.begin(16,2);
pinMode(INC, INPUT);
pinMode(next, INPUT);
pinMode(set_mad, INPUT);
pinMode(buzzer, OUTPUT);
lcd.setCursor(0,0);
lcd.print("Medicin reminder");
lcd.setCursor(0,1);
lcd.print(" Using Arduino ");
delay(2000);
lcd.setCursor(0,0);
lcd.print("By Saddam khan ");
lcd.setCursor(0,1);
lcd.print("Engineers Garage");
delay(2000);
if(!RTC.isrunning())
{
RTC.adjust(DateTime(__DATE__,__TIME__));
}
}
void loop()
{
int temp=0,val=1,temp4;
DateTime now = RTC.now();
if(digitalRead(set_mad) == 0) //set medicine time
{ lcd.setCursor(0,0);
lcd.print(" Set Medicine ");
lcd.setCursor(0,1);
lcd.print(" Reminder time ");
delay(2000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Enter Time 1");
defualt();
time(1);
delay(1000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Enter Time 2");
defualt();
delay(1000);
time(2);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Enter Time 3");
defualt();
time(3);
lcd.setCursor(0,0);
lcd.print("Medicin reminder");
lcd.setCursor(0,1);
lcd.print(" time has set ");
delay(2000);
}
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Time:");
lcd.setCursor(6,0);
lcd.print(HOUR=now.hour(),DEC);
lcd.print(":");
lcd.print(MINUT=now.minute(),DEC);
lcd.print(":");
lcd.print(SECOND=now.second(),DEC);
lcd.setCursor(0,1);
lcd.print("Date: ");
lcd.print(now.day(),DEC);
lcd.print("/");
lcd.print(now.month(),DEC);
lcd.print("/");
lcd.print(now.year(),DEC);
match();
delay(200);
}
void defualt()
{
lcd.setCursor(0,1);
lcd.print(HOUR);
lcd.print(":");
lcd.print(MINUT);
lcd.print(":");
lcd.print(SECOND);
}
/*Function to set alarm time and feed time into Internal eeprom*/
void time(int x)
{
int temp=1,minuts=0,hours=0,seconds=0;
while(temp==1)
{
if(digitalRead(INC)==0)
{
HOUR++;
if(HOUR==24)
{
HOUR=0;
}
while(digitalRead(INC)==0);
}
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Enter Time ");
lcd.print(x);
lcd.setCursor(0,1);
lcd.print(HOUR);
lcd.print(":");
lcd.print(MINUT);
lcd.print(":");
lcd.print(SECOND);
delay(100);
if(digitalRead(next)==0)
{
hours1=HOUR;
EEPROM.write(add++,hours1);
temp=2;
while(digitalRead(next)==0);
}
}
while(temp==2)
{
if(digitalRead(INC)==0)
{
MINUT++;
if(MINUT==60)
{MINUT=0;}
while(digitalRead(INC)==0);
}
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Enter Time ");
lcd.print(x);
lcd.setCursor(0,1);
lcd.print(HOUR);
lcd.print(":");
lcd.print(MINUT);
lcd.print(":");
lcd.print(SECOND);
delay(100);
if(digitalRead(next)==0)
{
minut=MINUT;
EEPROM.write(add++, minut);
temp=0;
while(digitalRead(next)==0);
}
}
delay(1000);
}
/* Function to chack medication time */
void match()
{
int tem[17];
for(int i=11;i<17;i++)
{
tem[i]=EEPROM.read(i);
}
if(HOUR == tem[11] && MINUT == tem[12])
{
beep();
beep();
beep();
beep();
lcd.setCursor(0,0);
lcd.print(" Take Group One ");
lcd.setCursor(0,1);
lcd.print(" Medicine ");
beep();
beep();
beep();
beep();
}
if(HOUR == tem[13] && MINUT == tem[14])
{
beep();
beep();
beep();
beep();
lcd.setCursor(0,0);
lcd.print(" Take Group Two ");
lcd.setCursor(0,1);
lcd.print(" Medicine ");
beep();
beep();
beep();
beep();
}
if(HOUR == tem[15] && MINUT == tem[16] )
{
beep();
beep();
beep();
beep();
lcd.setCursor(0,0);
lcd.print("Take Group Three ");
lcd.setCursor(0,1);
lcd.print(" Medicine ");
beep();
beep();
beep();
beep();
}
}
/* function to buzzer indication */
void beep()
{
digitalWrite(buzzer,HIGH);
delay(500);
digitalWrite(buzzer, LOW);
delay(500);
}
You are already there
Did you try the library example ?
Did you write this sketch ?
I have tried a couple of libraries and 1 sketch works ok in a seriel monitor, but the hello world doesn't show up on the lcd.
No I didn't write the sketch, just downloaded it
please show a picture of your wiring and the LCD connection to the breadboard
I hope this is ok, if not, I'll try and get a better picture.
The strange thing is that with the SerielDisplay example, I can see text on the display which I send from the seriel monitor!!
Edit:
I uploaded the hello world sketch again, and this time it showed up ok on the lcd screen , but after I refreshed it, the text didn't show, aargh!
Thanks
How is the LCD connected to the breadboard? what's that black thing across the pins?
Can you show the header and how the soldering looks like?
How does power get to the display? From what I can see in the photo it doesn't, but then the photo isn't very clear.
Looks like wires are plugged into Arduino headers, use DuPont wires.
We will try again, did you try the example from the library.
Where is the LCD potentiometer ?
Ok, another picture just of the wires into the breadboard.
The lcd is plugged into the holes on the board.
The pins were not soldered, just a very tight push fit when I bought it. a while ago now.
The black thing across the pins is the actual pin header in a shadow.
The power goes to the display direct from the arduino 5v supply and it is jumpered into the breadboard along with the GND wire.
You can just see the 10k pot in the bottom right of the picture.
that's not enough.
you MUST solder them. Otherwise you don't get reliable contacts - which explains why sometimes it works and sometimes not.
Wiper connection is on the opposite side. Apologies for not showing it, doh!
It has worked in the past, with other projects I have put together, but I have swapped it for another LCD display where the pins are soldered.
Comment on the potentiometer: wiper to V0 (pin #3 on the LCD) and one pin to GND. Leave the third pin free, do NOT connect to 5V.
yes, soldering is the base of solid reliable electronics
success, photoncatcher
It was a force of habit why I used GND and +Ve wires on the pot, as it comes from doing the same when I use pots on timers and op amp ics. I have just the GND wire now.
Now, I can only get a sketch showing on the lcd which is just 170 lines, but the one I really want to use is over 700 lines and does not show any text on the display.
is it a case of not enough memory or something on the Arduino as why the 700 line sketch doesn't show anything.
The verbose output when uploading the 700 line sketch says:
'Sketch uses 9050 bytes (28%) of program storage space. Maximum is 32256 bytes.'
So that's 9Kb and 32Kb approx.
'Global variables use 890 bytes (43%) of dynamic memory, leaving 1158 bytes for local variables. Maximum is 2048 bytes.'
Well that was short lived as the 170 line sketch won't show up in the display now!!
Also, previously, I was getting the 'programmer not responding' error message during upload to 3 arduinos. I changed the usb lead, then the the usb port, then another computer, but was till getting the same error. Common denominator was the Arduino, but why 3 all at the same time.
Thanks anyway for your time.