working mbed program for Adafruit ST7735

Dependencies:   Adafruit_GFX Adafruit_ST7735 SDFileSystem mbed-os

Fork of mbed-OLED-example-NCS36510 by ON Semiconductor

Revision:
0:8fbbced097c5
Child:
2:fa3fb1787cf8
diff -r 000000000000 -r 8fbbced097c5 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jan 25 18:51:37 2017 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#include "SeeedGrayOLED.h"
+
+DigitalOut led1(LED1);
+SeeedGrayOLED SeeedGrayOled(I2C1_SDATA_1, I2C1_SCLK_1);
+
+int main() {
+      
+    SeeedGrayOled.init();
+    SeeedGrayOled.clearDisplay();
+    SeeedGrayOled.setNormalDisplay();
+    SeeedGrayOled.setVerticalMode();
+    
+    while (true) 
+    {        
+        for(char i=1; i<11; i++)
+        {
+            led1 = !led1;
+            SeeedGrayOled.setTextXY(i,1);       //1st row, 0th column
+            SeeedGrayOled.setGrayLevel(i);      //Set Grayscale level. Any number between 0 - 15.
+            SeeedGrayOled.putString("Hello World");
+            Thread::wait(10);
+       }
+        Thread::wait(5000);
+    }
+}
+