Ahmed Hedait / Mbed 2 deprecated el16ah

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
ahmedhedait
Date:
Tue May 08 10:52:21 2018 +0000
Parent:
17:68d4b4095d80
Child:
19:c6ebd1394bda
Commit message:
converted from using Joystick to the whole Gamepad.

Changed in this revision

MazeEngine/MazeEngine.h 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
--- a/MazeEngine/MazeEngine.h	Tue May 08 10:45:01 2018 +0000
+++ b/MazeEngine/MazeEngine.h	Tue May 08 10:52:21 2018 +0000
@@ -4,6 +4,8 @@
 #include "mbed.h"
 #include "N5110.h"
 #include "Gamepad.h"
+#include "Maze.h"
+#include "Ball.h"
 
 class MazeEngine
 {
--- a/main.cpp	Tue May 08 10:45:01 2018 +0000
+++ b/main.cpp	Tue May 08 10:52:21 2018 +0000
@@ -10,20 +10,22 @@
 
 
 #include "mbed.h"
-#include "Joystick.h"
+#include "Gamepad.h"
 #include "N5110.h"
+#include "MazeEngine.h"
 
 
 
-Joystick joystick(PTB10,PTB11,PTC16);
 N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
+Gamepad pad;
+MazeEngine maze;
 
 
 
 int main( )
 {
-    // INTIALISING THE LCD AND JOYSTICK.
-    joystick.init();
+    // INTIALISING THE LCD AND GAMEPAD.
+    pad.init();
     lcd.init();
     lcd.setContrast(0.4);
     lcd.normalMode();
@@ -44,7 +46,7 @@
         lcd.clear();
 
 
-        Direction dir = joystick.get_direction();
+        Direction dir = pad.get_direction();
         // printf("direction %i\n", dir);