A retro gaming programme, designed for use on a portable embedded system. Incorporates power saving techniques.

Dependencies:   ConfigFile N5110 PowerControl beep mbed

Files at this revision

API Documentation at this revision

Comitter:
el13drt
Date:
Thu Apr 23 19:21:23 2015 +0000
Parent:
45:644acbbb63ed
Child:
47:88e3e6c0452d
Commit message:
debounce,FXOption, flashmemory,hazards

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
tower.h Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Apr 23 19:16:54 2015 +0000
+++ b/main.cpp	Thu Apr 23 19:21:23 2015 +0000
@@ -14,7 +14,7 @@
 
 int main()
 {
-    ledY = 1;//power LED on
+    ledP = 1;//power LED on
     randomise();//randomises falling hazards (initial values only)
     calibrateJoystick();//get centred values of joystick
     pollJoystick.attach(&updateJoystick,1.0/10.0);//read joystick 10 times per second
--- a/tower.h	Thu Apr 23 19:16:54 2015 +0000
+++ b/tower.h	Thu Apr 23 19:21:23 2015 +0000
@@ -20,8 +20,8 @@
 DigitalIn buttonB(p19);//buttonB
 
 //LED indicators
-AnalogOut ledR(p18);//red LED
-DigitalOut ledY(p24);//yellow LED
+AnalogOut ledA(p18);//red LED
+DigitalOut ledP(p24);//yellow LED
 
 //connections for joystick
 InterruptIn joyButton(p17);//Interrupt for ISR
@@ -533,13 +533,13 @@
 void actionButtons()
 {
     if((FX == 0)&&(buttonA||buttonB)) {
-        ledR = 1;
+        ledA = 1;
         buzzer.beep(1500,0.3);
     }
     if (buttonA || buttonB) {
-        ledR = 1;
+        ledA = 1;
     } else {
-        ledR = 0;
+        ledA = 0;
     }
 }