rascupanamuha
Member
I am stuck on one simple thing.
I have 20x04 LCD display with IC2 board (the last one here): **broken link removed**
Here is what i want. If digital pin 6 is 5V, then write 5 on LCD, or if pin 6 is 0V, then write 0
void loop()
{
lcd.home ();
lcd.clear();
int x
;
if (LED2==HIGH) x=5;
else x=0;
lcd.setCursor ( 0, 2 );
lcd.print (x);
delay (200);
}
LCD always shows 0, even when it is not. And even when i reset atmega 328p
Please help me if you know what is wrong in my code
I have 20x04 LCD display with IC2 board (the last one here): **broken link removed**
Here is what i want. If digital pin 6 is 5V, then write 5 on LCD, or if pin 6 is 0V, then write 0
void loop()
{
lcd.home ();
lcd.clear();
int x
;
if (LED2==HIGH) x=5;
else x=0;
lcd.setCursor ( 0, 2 );
lcd.print (x);
delay (200);
}
LCD always shows 0, even when it is not. And even when i reset atmega 328p
Please help me if you know what is wrong in my code