TextLCD with I/O I2C expander

Dependencies:   mbed

main.cpp

Committer:
Wimpie
Date:
2010-12-23
Revision:
0:c54cd22b2d9b

File content as of revision 0:c54cd22b2d9b:

#include "I2CTextLCD.h"

I2CTextLCD LCD(p9, p10,0x40);

int main() {

    while (1) {
        for (int i=0;i<8;i++) {
            LCD.cls();
            LCD.locate(0,0);
            for (int j=0;j<32;j++) {

                LCD.printf("%c", i*32+j);
            }
            wait(1);
            if ((i % 2)==0)
                LCD.backlight(true);
            else
                LCD.backlight(false);
        }

    }

}