The Arduino software to drive the LCD is very simple. Here's the code used for the picture above:
#include <:lcdi2c.h>
#include <wire.h>
int ADDR = 0x21;
LCDI2C lcd = LCDI2C(ADDR);
void setup()
{
Wire.begin();
lcd.init();
lcd.print("test");
}
void loop()
{
lcd.cursorTo(2,0);
lcd.print("time:");
lcd.cursorTo(2,6);
// print the number of seconds since reset:
lcd.print(millis()/1000);
}
No comments:
Post a Comment