scrolling example code for SHARP LCD LS027B4DH01/LS027B7DH01, using AkiSpiLcd library
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:
- schematic example2:
- example1 photo:
- example2 photo:
- example2 movie (mpeg4 movie):
main.cpp
- Committer:
- k4zuki
- Date:
- 2014-05-06
- Revision:
- 5:8883e74c0f11
- Parent:
- 3:8dbf3336dc66
- Child:
- 6:abfbb8453a70
File content as of revision 5:8883e74c0f11:
#define MBEDSHIELD_050 #include "mbed.h" #include "hogepic.h" #include "AkiSpiLcd.h" /* 1 SCLK D3=p13 2 MOSI D5=p11 3 CS D2=p14 4 DISP enable D5=p22 */ AkiSpiLcd LCD(MOSI_, SCK_, D2, D5); DigitalOut myled(LED1); extern const uint8_t hogepic[]; int main() { wait_ms(1); 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))); } } }