TextLCD with I/O I2C expander

Dependencies:   mbed

Committer:
Wimpie
Date:
Thu Dec 23 13:04:51 2010 +0000
Revision:
0:c54cd22b2d9b

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Wimpie 0:c54cd22b2d9b 1 #include "I2CTextLCD.h"
Wimpie 0:c54cd22b2d9b 2
Wimpie 0:c54cd22b2d9b 3 I2CTextLCD LCD(p9, p10,0x40);
Wimpie 0:c54cd22b2d9b 4
Wimpie 0:c54cd22b2d9b 5 int main() {
Wimpie 0:c54cd22b2d9b 6
Wimpie 0:c54cd22b2d9b 7 while (1) {
Wimpie 0:c54cd22b2d9b 8 for (int i=0;i<8;i++) {
Wimpie 0:c54cd22b2d9b 9 LCD.cls();
Wimpie 0:c54cd22b2d9b 10 LCD.locate(0,0);
Wimpie 0:c54cd22b2d9b 11 for (int j=0;j<32;j++) {
Wimpie 0:c54cd22b2d9b 12
Wimpie 0:c54cd22b2d9b 13 LCD.printf("%c", i*32+j);
Wimpie 0:c54cd22b2d9b 14 }
Wimpie 0:c54cd22b2d9b 15 wait(1);
Wimpie 0:c54cd22b2d9b 16 if ((i % 2)==0)
Wimpie 0:c54cd22b2d9b 17 LCD.backlight(true);
Wimpie 0:c54cd22b2d9b 18 else
Wimpie 0:c54cd22b2d9b 19 LCD.backlight(false);
Wimpie 0:c54cd22b2d9b 20 }
Wimpie 0:c54cd22b2d9b 21
Wimpie 0:c54cd22b2d9b 22 }
Wimpie 0:c54cd22b2d9b 23
Wimpie 0:c54cd22b2d9b 24 }