Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 2:8382613c86a0
- Child:
- 3:087b28bf8b96
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Apr 01 11:50:07 2019 +0000
@@ -0,0 +1,52 @@
+/*
+ELEC2645 Embedded Systems Project
+School of Electronic & Electrical Engineering
+University of Leeds
+Name: Maxim C. Delacoe
+Username: EL 17 MCD
+Student ID Number: 2011 58344
+Date: 19/03/2019
+*/
+///////// pre-processor directives ////////
+#include "mbed.h"
+#include "Gamepad.h"
+#include "N5110.h"
+#include "Bitmap.h"
+
+N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
+
+const int tank_left[6][10] = {
+ { 0,0,0,1,1,1,0,0,0,0 },
+ { 0,0,1,1,1,1,1,0,0,0 },
+ { 0,0,1,1,1,1,1,1,1,0 },
+ { 1,1,1,1,1,1,1,1,1,1 },
+ { 1,0,1,0,1,0,1,0,1,0 },
+ { 0,1,0,1,0,1,0,1,0,0 },
+};
+
+void welcome()
+{
+ lcd.clear();
+ lcd.printString(" ELEC 2645",0,0);
+ lcd.printString(" Game ",0,1);
+ lcd.printString(" Project",0,2);
+ lcd.printString("Max C. Delacoe",0,4);
+ lcd.printString(" 2011 58344",0,5);
+ lcd.refresh();
+ wait(0.2);
+}
+
+int main()
+{
+ lcd.init();
+ welcome(); // display welcome message
+
+ while(1) { // infinite loop
+
+ lcd.clear();
+ lcd.drawSprite(2,40-6,6,10,(int *)tank_left);
+ lcd.refresh();
+ wait_ms(250);
+ }
+}
+