scrolling example code for SHARP LCD LS027B4DH01/LS027B7DH01, using AkiSpiLcd library

Dependencies:   AkiSpiLcd mbed

This is very basic library example to access a graphic LCD LS027B4DH01 or LS027B7DH01

Import libraryAkiSpiLcd

Basic library for SHARP LCD LS027B4DH01/LS027B7DH01

  • schematic example1: /media/uploads/k4zuki/akispilcd_v2.1m.sch.png
  • schematic example2: /media/uploads/k4zuki/2.7inchshield.sch.png
  • example1 photo: /media/uploads/k4zuki/2014-09-17_20.22.26.jpg /media/uploads/k4zuki/2014-09-17_20.22.48.jpg
  • example2 photo: /media/uploads/k4zuki/2014-04-29_13.17.57.jpg
  • example2 movie (mpeg4 movie):
Revision:
3:8dbf3336dc66
Parent:
1:be675380f70b
Child:
5:8883e74c0f11
--- a/main.cpp	Sun May 04 04:07:10 2014 +0000
+++ b/main.cpp	Tue May 06 13:01:55 2014 +0000
@@ -13,14 +13,14 @@
 
 AkiSpiLcd LCD(MOSI_, SCK_, D2, D5);
 DigitalOut myled(LED1);
-Ticker disp;
+//Ticker disp;
 extern volatile const uint8_t hogepic[];
-
+/*
 void dispinvert(void)
 {
     LCD.cominvert();
 }
-
+*/
 int main()
 {
 
@@ -29,16 +29,16 @@
     LCD.cls();
     LCD.updateSingle(10,(uint8_t*)(hogepic+2000));
     LCD.updateMulti(100,(240-100),(uint8_t*)(hogepic));
-    
+
     while(1) {
-    for(int i=0;i<240;i++){
-        LCD.updateMulti(i,(240-i),(uint8_t*)(hogepic));
-        LCD.updateMulti(0,(i),(uint8_t*)(hogepic+50*(240-i)));
-    }
-/*        myled = 1;
-        wait(0.2);
-        myled = 0;
-        wait(0.2);*/
+        for(int i=0; i<240; i++) {
+            LCD.updateMulti(i,(240-i),(uint8_t*)(hogepic));
+            LCD.updateMulti(0,(i),(uint8_t*)(hogepic+50*(240-i)));
+        }
+        /*        myled = 1;
+                wait(0.2);
+                myled = 0;
+                wait(0.2);*/
     }
 }