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: N5110 SoftPWM mbed
Fork of Treasure_Hunt by
Revision 10:1d229362c134, committed 2016-04-27
- Comitter:
- Nikollao
- Date:
- Wed Apr 27 17:09:13 2016 +0000
- Parent:
- 9:ce2d9c42edea
- Child:
- 11:53caf3d944a9
- Commit message:
- components assigned to correct pins
Changed in this revision
| main.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.h Mon Apr 18 11:04:35 2016 +0000 +++ b/main.h Wed Apr 27 17:09:13 2016 +0000 @@ -47,29 +47,36 @@ InterruptIn sw2(SW2); InterruptIn sw3(SW3); -/** -@nameSpace button -@brief interrupt executes an event triggered task -*/ -InterruptIn button(PTB2); /** @nameSpace xPot @brief read x-axis position from the value of the joystick */ -AnalogIn xPot(PTB3); +AnalogIn xPot(PTB2); /** @nameSpace yPot @brief read y-axis position from the value of the joystick */ -AnalogIn yPot(PTB10); +AnalogIn yPot(PTB3); + +/** +@nameSpace button +@brief interrupt executes an event triggered task +*/ +InterruptIn button(PTB10); + +/** +@nameSpace button +@brief interrupt executes an event triggered task +*/ +InterruptIn button1(PTB18); /** @nameSpace buzzer @brief create PWM signal to set buzzer duty cycle and period */ -PwmOut buzzer(PTC11); +PwmOut buzzer(PTB9); /** @nameSpace ticker @@ -263,7 +270,9 @@ volatile int g_sw3_flag = 0; /*!< set timer flag in the isr, event trigger interrupt */ -volatile int g_button_flag = 0; /*!< set timer flag in the isr, event trigger interrupt */ +volatile int g_button_flag = 0; /*!< set flag in the isr, event trigger interrupt */ + +volatile int g_button1_flag = 0; /*!< set flag in the isr, event trigger interrupt */ volatile int option = 0; /*!< select option in menu based on Joystick's movement */ @@ -283,6 +292,7 @@ int state = 0; /*!< controls the direction of the objtacle */ int objectX1 = 58; /*!< used to move obstacles in the x-axis */ + int state1 = 1; /*!< controls the direction of the objtacle */
