Kai Liu / Mbed 2 deprecated SSD1306

Dependencies:   SSD1306 mbed

Files at this revision

API Documentation at this revision

Comitter:
allankliu
Date:
Sun Jun 08 10:59:42 2014 +0000
Commit message:
Demo LPC1114 with SSD1306.

Changed in this revision

SSD1306.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SSD1306.lib	Sun Jun 08 10:59:42 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/Byrn/code/SSD1306/#1d9df877c90a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Jun 08 10:59:42 2014 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+ 
+#include "ssd1306.h"
+#include "standard_font.h"
+#include "bold_font.h"
+ 
+SSD1306 oled(p8 /* cs */, p9 /* reset */, p14 /* dc */,
+             p13 /* clock */, p11 /* data */);
+ 
+int main()
+{
+    oled.initialise();
+    oled.clear();
+    oled.set_contrast(255); // max contrast
+ 
+    oled.set_font(bold_font, 8);
+    oled.printf("Heading\r\n");
+ 
+    oled.set_font(standard_font, 6);
+    oled.printf("Hello World!\r\n");
+    oled.printf("Some more text here...");
+ 
+    oled.update();
+ 
+    while (1)
+    {
+        wait(2);
+        oled.scroll_up();
+        oled.update();
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Jun 08 10:59:42 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/0b3ab51c8877
\ No newline at end of file