The start of a generic Text Display library to drive multiple types of text display in the same way

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 // simple test of the start of a generic Text Display arch, sford
00002 
00003 #include "mbed.h"
00004 
00005 #include "TextDisplays.h"
00006 
00007 TextLCD lcd1(p10, p11, p12, p15, p16, p29, p30); // rs, rw, e, d0-d3
00008 Terminal lcd2(USBTX, USBRX); // tx, rx
00009 
00010 int main() {
00011     lcd1.printf("Hello World!\nHow are you?");
00012     lcd2.printf("Hello World!\nHow are you?");
00013 
00014     wait(2);
00015 
00016     lcd1.locate(3,1);
00017     lcd2.locate(3,1);
00018     lcd1.foreground(0xFF0000);
00019     lcd2.foreground(0xFF0000);
00020     lcd1.printf("I'm Great!");
00021     lcd2.printf("I'm Great!");
00022 
00023     wait(3);
00024 
00025     lcd1.cls();
00026     lcd2.cls();
00027 }