My ELEC2645 project. Nikollao Sulollari. 200804685
Dependencies: N5110 SoftPWM mbed
Fork of Treasure_Hunt by
Diff: main.cpp
- Revision:
- 14:91ae0afe9037
- Parent:
- 13:359d3aa66352
- Child:
- 15:c7af2ea5f164
--- a/main.cpp Thu Apr 28 22:04:15 2016 +0000 +++ b/main.cpp Fri Apr 29 14:19:57 2016 +0000 @@ -9,34 +9,14 @@ int main() { lcd.init(); - button.rise(&button_isr); ///assign rise with ISR - button1.rise(&button1_isr); init_K64F(); init_serial(); - /*while(1) { - - lcd.clear(); - if (g_button_flag) { - lcd.printString("button is ON!",0,0); - } else { - lcd.printString("button is OFF!",0,0); - } - if (g_button1_flag) { - lcd.printString("button1 is ON",0,4); - lcd.refresh(); - }else { - lcd.printString("button1 is OFF!",0,4); - lcd.refresh(); - } - wait(0.2); - lcd.refresh(); - }*/ - init_game(); ///initialize game calibrateJoystick(); ///calibrate joystick - - ticker.attach(&timer_isr,0.04); ///attach ticker with ISR every 0.1 sec + button.rise(&button_isr); ///assign rise with ISR + button1.rise(&button1_isr); + ticker.attach(&timer_isr,0.05); ///attach ticker with ISR every 0.1 sec reset = level; ///set reset = level to check later if level has increased // buzzer.start(); //buzzer.write(0.5);