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: EMG HIDScope PID QEI mbed TextLCD
Diff: inits.h
- Revision:
- 11:c5042e19a096
- Parent:
- 10:819fb5288aa0
diff -r 819fb5288aa0 -r c5042e19a096 inits.h --- a/inits.h Tue Oct 27 17:18:17 2015 +0000 +++ b/inits.h Mon Nov 02 11:12:46 2015 +0000 @@ -31,24 +31,22 @@ DigitalIn edgeStart(PTC8); DigitalIn edgeFinish(PTC1); -// pot input -AnalogIn pot1(A0); -AnalogIn pot2(A1); - // user interface DigitalOut statusled(LED_GREEN); InterruptIn startButton(D3); bool calibrated=false; // bool to determine if button press has to start calibration or the game InterruptIn stopButton(D2); InterruptIn initpositionButton(PTC6); -HIDScope scope(5); +HIDScope scope(6); bool controlbypc=false; +DigitalOut musicHit(A5); + //////////////////////////// //////// Timers //////////// //////////////////////////// -Ticker scopeTimer; Timer playTimer; +int playTime; Ticker motorControlTicker; Ticker lcdTicker; bool lcdGoFlag=false; @@ -86,13 +84,16 @@ float maxspeed=1; //cm/sec float currentX; float currentY; -float l=57; +float l=50; float toX; float toY; float toLeftAngle; float toRightAngle; float M_PI=3.14159265359; string text; +int hitCount=0; +float hitTime=0; +bool started=false; ////////////////////////////////// ////// initialize functions //////