frederic blanc / Mbed 2 deprecated sp5gfx1

Dependencies:   mbed

Revision:
0:2052f61477b1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jul 06 12:06:40 2011 +0000
@@ -0,0 +1,38 @@
+#include "mbed.h"
+#include  "SPLC501C.h"
+#include  "graphic.h"
+
+int main() {
+
+    GLCD_Initialize(); //init
+    wait(0.1);
+    GLCD_ClearScreen(); //clear
+
+    char str[10]="Bonjour"; 
+    str[9]=0;
+    GLCD_GoTo(10,0); //
+    GLCD_WriteString10x16(str); //print font 10x16
+    GLCD_GoTo(10,3);
+    GLCD_WriteString5x7(str); //print font 5x7
+    
+    unsigned char i=0;
+    unsigned char r=5;
+    while (1) {
+        GLCD_GoTo(10,6);
+        sprintf(str,"%d  ",i++);
+        GLCD_WriteString10x16(str);
+        for(char j=0;j<5;j++)
+        {
+            GLCD_Circle(64, 30 ,r+j,1);
+            GLCD_Circle(64, 30 ,r-j,0);
+        }
+        r+=5;
+        wait(0.5);
+        if (r>25)
+        {
+            GLCD_ClearScreen();
+            r=5;
+        }
+    }
+}
+