Im new to arduino and learning as fast as I can. Ive had no problems displaying text on the LCD, but now Im trying to make a simple 60 second count down timer and I can’t figure how to send the “count” variable to the LCD as a number. This code worked fine with “count” replaced with raw text but will not compile as shown. Im sure Ive missed something very simple I just cant figure out what.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
byte count = 60;
void setup()
{
// initialize the lcd
lcd.init();
lcd.backlight();
}
void loop()
{
do {
lcd.setCursor(3,0);
lcd.print(count);
delay (1000);
lcd.clear();
count = count - 1;
}while (count > 0);
count = 60;
}