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:
- 1:3183193cf44e
- Parent:
- 0:a0dedca5e89f
- Child:
- 3:f686f6d7bdff
diff -r a0dedca5e89f -r 3183193cf44e main.cpp
--- a/main.cpp Tue Mar 12 09:38:02 2019 +0000
+++ b/main.cpp Sun Mar 31 22:49:44 2019 +0000
@@ -1,5 +1,9 @@
#include "mbed.h"
+#include "Gamepad.h"
+#include "N5110.h"
+#include "menu.h"
+
/*
ELEC2645 Embedded Systems Project
@@ -11,10 +15,32 @@
Date: 12.03.2019
*/
-Serial pc(USBTX, USBRX); // tx, rx
+// consytucting the gamepad
+Gamepad gamepad;
+
+// constructing the lcd
+N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
int main() {
+ // initialize the gamepad
+ gamepad.init();
+ gamepad.leds_on();
- pc.printf("Hello World!\n");
-
+ // initialize the lcd
+ lcd.init();
+ lcd.setContrast(0.4);
+
+ while(true) {
+ // refresh the screen
+ lcd.clear();
+
+ // draw the big circle
+ //lcd.drawCircle(42,64,35,FILL_TRANSPARENT);
+ Menu menu;
+ menu.startMainMenu(lcd);
+
+ // lcd.drawLine(11, 47, 74, 45, 1);
+ lcd.refresh();
+
+ }
}
\ No newline at end of file