Simon Ford
/
NokiaLCD_HelloWorld
Hello World Example for the Nokia LCD library
Diff: main.cpp
- Revision:
- 0:fd3c4e179035
- Child:
- 1:823d052d5150
diff -r 000000000000 -r fd3c4e179035 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jun 09 08:02:57 2010 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" +#include "NokiaLCD.h" + +NokiaLCD lcd(p5, p7, p8, p9); // mosi, sclk, cs, rst + +int main() { + lcd.background(0x0000FF); + lcd.cls(); + lcd.fill(2, 51, 128, 10, 0x00FF00); + lcd.fill(50, 1, 10, 128, 0xFF0000); + lcd.locate(0,3); + lcd.printf("Hello World!"); + for (int i=0; i<130; i++) { + lcd.pixel(i, 80 + sin((float)i / 5.0)*10, 0x000000); + } +}