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: ModeA/ModeA.cpp
- Revision:
- 16:7b179005cd91
- Parent:
- 15:1463ebaf5c75
- Child:
- 18:59befe1eaa56
--- a/ModeA/ModeA.cpp Thu May 09 01:52:56 2019 +0000
+++ b/ModeA/ModeA.cpp Thu May 09 02:20:57 2019 +0000
@@ -30,7 +30,7 @@
bar_width = 10;
bar_speed = 2;
- score = 1;
+ score = 0;
srand(time(NULL));
@@ -93,12 +93,19 @@
lcd.drawRect(screen_width,0,bar_width,size_top,FILL_BLACK);
lcd.drawRect(screen_width,48-size_bottom,bar_width,size_bottom,FILL_BLACK);
lcd.refresh();
+
if ((screen_width == x_position) && (size_top < y_position)) {
score = score + 1;
lcd.clear();
sprintf(buffer,"%2d",score);
- }
+ lcd.printString("Reset",15,2);
+ lcd.refresh();
+ wait(1.0);
+
+
+
+ }
if ( pad.check_event(Gamepad::X_PRESSED) == true) {
@@ -130,7 +137,12 @@
wait(0.5);
}
-
+
+
+ // if (score == 2) {
+ // lcd.clear();
+ // lcd.printString("Press Reset",6,2);
+ // }
screen_width = screen_width - bar_speed;