Simple program to drive an I2C character display.
Dependencies: Skool_wkshp_lib2015 mbed
Diff: Skool_display.cpp
- Revision:
- 0:2e362289ef7e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Skool_display.cpp Fri Oct 02 21:45:38 2015 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +#include "serial_lcd.h" +#include "pc_uart.h" + +extern Serial pc; // UART to communicate with PC +DigitalOut GLED(PB_5); + +int main() { + + GLED = 1; + + init_ser_lcd(); + write_ser_lcd(0x80, false); // set DDRAM addr to 0x00 + write_ser_text((char *)"ARM SKOOL",16); + write_ser_lcd(0xC0, false); // set DDRAM addr to 0x40, beginning of 2nd line + write_ser_text((char *)" Kijelzo teszt ", 16); + + wait(3.0); + + while (1) { + GLED = !GLED; + wait(1.0); + } +}