Toyomasa Watarai
/
OM13082-LCD
Example program for LPC General Purpose Shield using the 128x64 LCD module
Diff: main.cpp
- Revision:
- 0:6a2e37a92150
- Child:
- 1:ef7d2db1e9db
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jul 29 06:40:40 2015 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" +#include "K7567.h" + +K7567 lcd(D11, D13, D12, D9, D10); // mosi, sclk, reset, A0, nCS + +int main() +{ + int count=0; + lcd.set_contrast(0x3f); + lcd.cls(); + + lcd.locate(0, 1); + lcd.printf("LPC General Purpose Shield"); + lcd.locate(0, 2 + 8); + lcd.printf("[OM13082] test program"); + + lcd.rect(80, 20, 80+40, 20+40, 1); + lcd.circle(20, 40, 20, 1); + + while(true) { // this is the third thread + lcd.locate(0, 3 + 24); + lcd.printf("Counting : %d",count); + count++; + wait(1.0); + } +}