Heavily documented control library for the uOLED-96-G1 (SGC) by 4D Systems. Will likely work with any of the 4D Systems serial controlled screens. <<info>> All examples in the documentation have been tested to the best of my current abilities, but there are a few functions that I simply do not use. I have created a Lighthouse page for this library. You may submit bug reports or feature requests to [[http://mbed-uoled.lighthouseapp.com|this page]]. If you really do not wish to sign up for a Lighthouse account you may also post any bugs or requests [[/users/Nakor/notebook/uoled-bug-reports/|here]]. <</info>>

Dependents:   DS18B20 DS18B20GSM Astromed Astromed_build20121123

Revision:
21:87a2227c1ad2
Parent:
19:cc4f5d01f080
Child:
22:66401b612b1b
--- a/uOLED.cpp	Tue Dec 21 14:47:35 2010 +0000
+++ b/uOLED.cpp	Sun Dec 26 18:49:00 2010 +0000
@@ -148,25 +148,32 @@
     return (_oled.getc() == OLED_ACK);
 }
 
-bool uOLED::drawRectangle(char x, char y, char width, char height, short color) {
+bool uOLED::drawRectangle(char x, char y, char width, char height, short red, short green, short blue)
+{
+    short colour = getRGB(red, green, blue);
+    
     _oled.putc(0x72);
     _oled.putc(x);
     _oled.putc(y);   
     _oled.putc(x + width);
     _oled.putc(y + height);
-    _oled.putc(color >> 8);
-    _oled.putc(color & 0xFF);
+    _oled.putc(colour >> 8);
+    _oled.putc(colour & 0xFF);
 
     return (_oled.getc() == OLED_ACK);
 }
 
-bool uOLED::drawText(char column, char row, char font, short color, char *text) {
+bool uOLED::drawText(char column, char row, char font, short red, short green, short blue, char *text)
+{
+
+    short colour = getRGB(red, green, blue);
+
     _oled.putc(0x73);
     _oled.putc(column);
     _oled.putc(row);
     _oled.putc(font);   
-    _oled.putc(color >> 8);
-    _oled.putc(color & 0xFF);  
+    _oled.putc(colour >> 8);
+    _oled.putc(colour & 0xFF);  
     for (int i=0 ; i<strlen(text) ; i++) _oled.putc(text[i]);
     _oled.putc(0x00);
     
@@ -191,7 +198,11 @@
     return (_oled.getc() == OLED_ACK);
 }
 
-bool uOLED::drawTriangle(char x1, char y1, char x2, char y2, char x3, char y3, short color) {
+bool uOLED::drawTriangle(char x1, char y1, char x2, char y2, char x3, char y3, short red, short green, short blue)
+{
+
+    short colour = getRGB(red, green, blue);
+    
     _oled.putc(0x47);
     _oled.putc(x1);
     _oled.putc(y1);
@@ -199,8 +210,8 @@
     _oled.putc(y2);
     _oled.putc(x3);
     _oled.putc(y3);
-    _oled.putc(color >> 8);
-    _oled.putc(color & 0xFF);
+    _oled.putc(colour >> 8);
+    _oled.putc(colour & 0xFF);
 
     return (_oled.getc() == OLED_ACK);
 }