* mbed demo: * Software PWM on the mbed LEDs. Counting in trinary using off, half bright and full on LEDs. * Smooth scrolling a graphic on a 16x2 LCD display (using ST7066U controller). * * 2012-05-09 John Schooling The code is not in a library but gives you what you need in one file to add the required code to your own library.

Dependencies:   mbed

Revision:
1:f0561ba3d266
Parent:
0:514531f6b9db
--- a/main.cpp	Wed May 09 14:29:05 2012 +0000
+++ b/main.cpp	Wed May 09 14:40:46 2012 +0000
@@ -143,9 +143,9 @@
             lcd_write_inst(0x40); // 0 1 A A A A A A  Set 6 bit CGRAM address in address counter
             for (int i = 63; i >= 0; i--) {
                 if (i/8 == 0 || i/8 == 4) {
-                    pict[i/8][i%8] |= ((pict[i/8 +3][i%8] &1) << 6); // Put previous low bit into bit 6.
+                    pict[i/8][i%8] |= ((pict[i/8 +3][i%8] &1) << 6); // Put right hand low bit into bit 6.
                 } else {
-                    pict[i/8][i%8] |= ((pict[i/8 -1][i%8] &1) << 6); // Put right hand end bit into bit 6.
+                    pict[i/8][i%8] |= ((pict[i/8 -1][i%8] &1) << 6); // Put previous low bit into bit 6.
                 }
             }
             for (int i = 0; i < 64; i++) {