Driver for a Text LCD using a PCF8574 over I2C
Dependencies: mbed
Fork of I2CTextLCD by
main.cpp@2:628a00fec43c, 2016-01-18 (annotated)
- Committer:
- mijimy
- Date:
- Mon Jan 18 04:02:04 2016 +0000
- Revision:
- 2:628a00fec43c
- Parent:
- 1:eac18254e072
- Child:
- 3:846b36e1f4d5
i2clcd counting display
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
romilly | 0:6beb6f498640 | 1 | #include "mbed.h" |
romilly | 0:6beb6f498640 | 2 | #include "TextLCD.h" |
romilly | 0:6beb6f498640 | 3 | |
mijimy | 2:628a00fec43c | 4 | TextLCD lcd(p9,p10); |
romilly | 0:6beb6f498640 | 5 | |
mijimy | 2:628a00fec43c | 6 | int main() |
mijimy | 2:628a00fec43c | 7 | { int count=0; |
mijimy | 2:628a00fec43c | 8 | lcd.printf("Hi mbed World!"); |
mijimy | 2:628a00fec43c | 9 | wait(5); |
mijimy | 2:628a00fec43c | 10 | lcd.cls(); |
mijimy | 2:628a00fec43c | 11 | lcd.locate(4,2); |
mijimy | 2:628a00fec43c | 12 | lcd.printf("count:"); |
mijimy | 2:628a00fec43c | 13 | while(1) |
mijimy | 2:628a00fec43c | 14 | { for(count=0;count<21;count+=1) |
mijimy | 2:628a00fec43c | 15 | { lcd.locate(11,2); |
mijimy | 2:628a00fec43c | 16 | lcd.printf(" %d ",count); |
mijimy | 2:628a00fec43c | 17 | wait(0.5); |
mijimy | 2:628a00fec43c | 18 | } |
mijimy | 2:628a00fec43c | 19 | |
mijimy | 2:628a00fec43c | 20 | } |
romilly | 0:6beb6f498640 | 21 | } |