Demonstration of SSD1308 OLED driver library

Dependencies:   mbed SSD1308_128x64_I2C

Revision:
5:dff410a009c5
Parent:
4:83b4e905be5b
Child:
6:44256b0b5d18
--- a/main.cpp	Wed Jul 18 14:14:19 2012 +0000
+++ b/main.cpp	Sat Jul 21 12:50:23 2012 +0000
@@ -50,9 +50,7 @@
     pc.printf("C: Flip and Mirror\r");                      
     pc.printf("D: Blink\r");   
     pc.printf("E: Big Chars\r");                       
-
-//    pc.printf("E: \n\r");                                
-//    pc.printf("F: \n\r");                                    
+    pc.printf("F: Progress Scale\r");    
 //    pc.printf("\n\r");                
      
 }
@@ -284,6 +282,24 @@
                      
                      pc.printf("E: Big Chars done\n\r");
                      break;   
+                     
+          case 'F' :                     
+                     pc.printf("F: Progress Scale\n\r");
+
+                     for (int percentage=0; percentage <= 100; percentage++) { 
+                       oled.writeProgressBar(2, 0, percentage); 
+                       oled.printf(" %3d %%", percentage);                                           
+                       
+                       oled.writeProgressBar(4, 0, 100 - percentage);                        
+                       oled.printf(" %3d %%", 100 - percentage);                                                                  
+                       wait(0.05);
+                     }                   
+
+                    
+                     pc.printf("F: Progress Scale done\n\r");                   
+                     break;   
+                     
+
                                                                                        
         } //switch
       }//if