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:
- 3:72e0f4d267ed
- Parent:
- 2:2cc42dea101c
--- a/main.cpp Mon Mar 25 10:32:21 2019 +0000
+++ b/main.cpp Thu Apr 11 14:53:08 2019 +0000
@@ -11,11 +11,11 @@
#include "mbed.h"
#include "Gamepad.h"
#include "N5110.h"
-#include "Smiley.h"
+#include "Game.h"
N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
Gamepad pad;
-Smiley smiley;
+Game game;
void init();
void start();
@@ -29,6 +29,8 @@
render();
while (1) {
+ game.read_input(pad);
+ game.movement(pad);
render();
}
@@ -41,7 +43,7 @@
void render(){
lcd.clear();
- smiley.drawSprite(lcd);
+ game.drawSprite(lcd);
lcd.refresh();
wait(0.1);
}