A retro gaming programme, designed for use on a portable embedded system. Incorporates power saving techniques.
Dependencies: ConfigFile N5110 PowerControl beep mbed
Diff: main.cpp
- Revision:
- 52:bb2acf0e248a
- Parent:
- 51:df3bab1d6926
- Child:
- 53:a3077af736bb
--- a/main.cpp Thu Apr 30 15:55:43 2015 +0000 +++ b/main.cpp Thu Apr 30 19:57:59 2015 +0000 @@ -12,6 +12,7 @@ #include <ctime> #include <cstdlib> + int main() { ledP = 1;//power LED on @@ -20,8 +21,11 @@ pollJoystick.attach(&updateJoystick,1.0/10.0);//read joystick 10 times per second lcd.init();//initialise screen + drawWelcome();//welcome screen + lcd.clear();//clear pixels + buttonA.mode(PullDown);//pull down buttonA buttonB.mode(PullDown);//pull down buttonB @@ -35,7 +39,7 @@ while(1) { drawMainMenu();//draws main menu mainMenu(mainOption);//presents main menu options - actionButtons(); + actionButtons();//sound light when buttons pressed // if 'Play Game' selected if ((mainOption == 0)&&(buttonFlagA)) {