Bonny Ngangu
/
Generic
implementing a generic screen introducing a game.
main.cpp
- Committer:
- bonnyngangu
- Date:
- 2016-05-06
- Revision:
- 0:0e74a8426191
File content as of revision 0:0e74a8426191:
/* Generic screen program Displaying a title on an diamond filled in black By Bonny_Ngangu 27-March-2016 */ #include "mbed.h" #include "N5110.h" // VCC,SCE,RST,D/C,MOSI,SCLK,LED N5110 lcd(PTE26 , PTA0 , PTC4 , PTD0 , PTD2 , PTD1 , PTC3); // Can also power (VCC) directly from VOUT (3.3 V) - // Can give better performance due to current limitation from GPIO pin int main() { // initialising the display lcd.init(); while(1) { // these are default settings so not strictly needed lcd.normalMode(); // normal colour mode lcd.setBrightness(1.0); // put LED backlight on 50% lcd.printString(" SQUASH!",15,2); lcd.inverseMode(); // invert colours lcd.drawLine(41,0,0,23,1); lcd.drawLine(41,0,83,23,1); lcd.drawLine(0,23,41,47,1); lcd.drawLine(83,23,41,47,1); lcd.refresh(); wait(5.0); lcd.clear(); } }