EA OLED Hello World (Runs through the different possibilities with the OLED software

Dependencies:   mbed

Revision:
0:ff072ee9597c
diff -r 000000000000 -r ff072ee9597c main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Oct 03 08:40:47 2010 +0000
@@ -0,0 +1,52 @@
+// example to test out OLED on mbed + XPresso baseboard, sford, Lerche
+
+#include "mbed.h"
+#include "EAOLED.h"
+
+// NOTE: The xpresso board does not provide the data/command signal to the mbed, so I added a wire:
+// Connect:
+//  PIO2_7 of baseboard mbed socket (empty 2nd hole below mbed pin 21)
+// to
+//   PIO0_8(p13) of J6 (7th hole down on left side of J6)
+// to provide OLED data/command signal
+
+EAOLED oled(p5, p6, p7, p8, p25); // mosi, dnc, sclk, cs, power
+
+int main() {
+    oled.cls();
+    oled.printf("Hello World!");
+    wait(1);
+    oled.locate(0,5);
+    oled.printf("I'm an OLED!");
+    wait(1);
+    oled.cls();
+    oled.hline(10,50,10,0xFFFFFF);
+    oled.locate(0,5);
+    oled.printf("Horizontal");
+    wait(2);
+    oled.cls();
+    oled.vline(10,30,63,0xFFFFFF);
+    oled.locate(0,5);
+    oled.printf("Vertical");
+    wait(2);
+    oled.cls();
+    oled.line(10,10,40,30,0xFFFFFF);
+    oled.locate(0,5);
+    oled.printf("oblique");
+    wait(2);
+    oled.cls();
+    oled.rect(10,10,30,30,0xFFFFFF);
+    oled.rect(50,5,60,25,0xFFFFFF);
+    oled.locate(0,5);
+    oled.printf("Rectangle");
+    wait(2);
+    oled.cls();
+    oled.fillrect(10,10,30,30,0xFFFFFF);
+    oled.locate(0,5);
+    oled.printf("Filled");
+    wait(2);
+    oled.cls();
+    oled.circle(10,10,7,0xFFFFFF);
+    oled.locate(0,5);
+    oled.printf("Circle");
+}