This is an example of using the Seed 96x96 OLED display. This display uses a SSD1327 driver. The example was developed on a Seed Arch Pro platform and the display was connected to the I2C grove connector.

Dependencies:   SeeedGrayOLED mbed

Files at this revision

API Documentation at this revision

Comitter:
danielashercohen
Date:
Fri Dec 19 07:58:21 2014 +0000
Child:
1:965b23180062
Commit message:
first working "hello world" example

Changed in this revision

SeeedGrayOLED.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/SeeedGrayOLED.lib	Fri Dec 19 07:58:21 2014 +0000
@@ -0,0 +1,1 @@
+SeeedGrayOLED#c035afedef89
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Dec 19 07:58:21 2014 +0000
@@ -0,0 +1,39 @@
+/*
+ *  Copyright (c) 2012 Neal Horman - http://www.wanlink.com
+ *
+ *  License: MIT open source (http://opensource.org/licenses/MIT)
+ *      Summary;
+ *      Use / modify / distribute / publish it how you want and
+ *      if you use it, or don't, you can't hold me liable for how
+ *      it does or doesn't work.
+ *      If it doesn't work how you want, don't use it, or change
+ *      it so that it does work.
+ */
+
+#include "mbed.h"
+#include "SeeedGrayOLED.h"
+
+DigitalOut myled(LED1);
+
+SeeedGrayOLED SeeedGrayOled(P0_10, P0_11);
+
+int main()
+{
+
+    while(1) {
+        SeeedGrayOled.init();             //initialize SEEED OLED display
+        SeeedGrayOled.clearDisplay();     //Clear Display.
+        SeeedGrayOled.setNormalDisplay(); //Set Normal Display Mode
+        SeeedGrayOled.setVerticalMode();  // Set to vertical mode for displaying text
+
+        for(char i=1; i < 11 ; i++) {
+            SeeedGrayOled.setTextXY(i,0);  //set Cursor to first line, 0th column
+            SeeedGrayOled.setGrayLevel(i); //Set Grayscale level. Any number between 0 - 15.
+            SeeedGrayOled.putString("Hello World"); //Print Hello World
+            wait_ms(1.0);
+        }
+
+        wait(5.0);
+    }
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Dec 19 07:58:21 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file