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.
Revision 18:d18b9185fa4f, committed 2018-05-08
- 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);