Opis nova verzija
Dependencies: N5110SPI SWSPI mbed
Fork of Nokia_FRDM by
main.cpp@2:4227ed52b378, 2016-05-25 (annotated)
- Committer:
- esokic
- Date:
- Wed May 25 07:59:36 2016 +0000
- Revision:
- 2:4227ed52b378
- Parent:
- 1:a174ab8a7339
Popravljena nokia FRDM
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
esokic | 0:01c7393abf13 | 1 | #include "mbed.h" |
esokic | 0:01c7393abf13 | 2 | #include "N5110.h" |
esokic | 2:4227ed52b378 | 3 | #include "SWSPI.h" |
esokic | 0:01c7393abf13 | 4 | |
esokic | 1:a174ab8a7339 | 5 | |
esokic | 0:01c7393abf13 | 6 | //Deklaracija LCD objekta |
esokic | 0:01c7393abf13 | 7 | //N5110 lcd(VCC,SCE,RST,D/C,MOSI,SCLK,LED) |
esokic | 2:4227ed52b378 | 8 | //(bilo koji pin se moze koristiti osim PTC0 i LED pin mora biti PTE20) |
esokic | 1:a174ab8a7339 | 9 | N5110 lcd(PTB8,PTA13,PTA12,PTD5,PTD2,PTC5,PTE20); |
esokic | 0:01c7393abf13 | 10 | |
esokic | 0:01c7393abf13 | 11 | int main() |
esokic | 0:01c7393abf13 | 12 | { |
esokic | 0:01c7393abf13 | 13 | // inicijalizacija displeja |
esokic | 0:01c7393abf13 | 14 | lcd.init(); |
esokic | 0:01c7393abf13 | 15 | |
esokic | 0:01c7393abf13 | 16 | // prikaz stringa |
esokic | 0:01c7393abf13 | 17 | lcd.printString("Mi volimo PAI!",0,0); |
esokic | 0:01c7393abf13 | 18 | |
esokic | 1:a174ab8a7339 | 19 | wait(2); |
esokic | 1:a174ab8a7339 | 20 | |
esokic | 1:a174ab8a7339 | 21 | lcd.clear(); |
esokic | 1:a174ab8a7339 | 22 | lcd.printString("Mi ipak vise",0,0); |
esokic | 1:a174ab8a7339 | 23 | lcd.printString("volimo US!",0,1); |
esokic | 1:a174ab8a7339 | 24 | while(1) { |
esokic | 2:4227ed52b378 | 25 | //lcd.drawCircle(10,10,5,1); |
esokic | 1:a174ab8a7339 | 26 | |
esokic | 1:a174ab8a7339 | 27 | } |
esokic | 0:01c7393abf13 | 28 | } |