implementing a generic screen introducing a game.

Dependencies:   N5110 mbed

Files at this revision

API Documentation at this revision

Comitter:
bonnyngangu
Date:
Fri May 06 17:06:42 2016 +0000
Commit message:
Creating a generic background for a game program.

Changed in this revision

N5110.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 0e74a8426191 N5110.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/N5110.lib	Fri May 06 17:06:42 2016 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/eencae/code/N5110/#ba8addc061ea
diff -r 000000000000 -r 0e74a8426191 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri May 06 17:06:42 2016 +0000
@@ -0,0 +1,37 @@
+/*
+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();
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 0e74a8426191 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri May 06 17:06:42 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/aae6fcc7d9bb
\ No newline at end of file