Example for using the Batron 16x2 LCD driver
Dependencies: mbed TMP102 PCF2119_16X2_LCD
main.cpp
- Committer:
- ssozonoff
- Date:
- 2011-05-13
- Revision:
- 0:01adc31d3af0
File content as of revision 0:01adc31d3af0:
#include "mbed.h" #include "PC2119_16X2_LCD.h" #include "TMP102.h" TMP102 temperature(p28, p27, 0x90); DigitalOut myled(LED1); PC2119_16X2_LCD lcd(p28, p27, p21); int main() { char str[5]; lcd.Init(); lcd.clear_display(); // spin it 180 lcd.flip_display(); while (1) { lcd.printf("%2.2fC", temperature.read()); lcd.write_xy(0x21, 1, 15, true); myled = 1; wait(0.5); myled = 0; lcd.write_xy(0x11, 1, 15, true); wait(0.5); } }