Simple program to drive an I2C character display.

Dependencies:   Skool_wkshp_lib2015 mbed

Skool_display.cpp

Committer:
lvagasi
Date:
2015-10-02
Revision:
0:2e362289ef7e

File content as of revision 0:2e362289ef7e:

#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);
    }
}