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.
Fork of Timer by
Functions/func.h@47:be4eebf40568, 2016-04-25 (annotated)
- Committer:
- IceTeam
- Date:
- Mon Apr 25 12:42:32 2016 +0000
- Revision:
- 47:be4eebf40568
- Parent:
- 45:b53ae54062c6
- Child:
- 49:5e2f7323f280
Petit commit de batard;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| sype | 41:b5a2fbc20beb | 1 | #ifndef FUNC_H |
| sype | 41:b5a2fbc20beb | 2 | #define FUNC_H |
| sype | 41:b5a2fbc20beb | 3 | |
| sype | 41:b5a2fbc20beb | 4 | #include "mbed.h" |
| sype | 41:b5a2fbc20beb | 5 | #include "../RoboClaw/RoboClaw.h" |
| sype | 41:b5a2fbc20beb | 6 | #include "../Odometry/Odometry.h" |
| sype | 41:b5a2fbc20beb | 7 | #include "../StepperMotor/Stepper.h" |
| IceTeam | 47:be4eebf40568 | 8 | #include "Map/map.h" |
| sype | 41:b5a2fbc20beb | 9 | #include "AX12.h" |
| sype | 41:b5a2fbc20beb | 10 | |
| sype | 41:b5a2fbc20beb | 11 | #define SEUIL 0.25 |
| sype | 45:b53ae54062c6 | 12 | #define dt 10000 |
| sype | 41:b5a2fbc20beb | 13 | |
| sype | 41:b5a2fbc20beb | 14 | extern Serial logger; |
| sype | 41:b5a2fbc20beb | 15 | extern RoboClaw roboclaw; |
| sype | 41:b5a2fbc20beb | 16 | extern DigitalOut bleu; |
| sype | 41:b5a2fbc20beb | 17 | extern DigitalOut blanc; |
| sype | 41:b5a2fbc20beb | 18 | extern DigitalOut rouge; |
| sype | 41:b5a2fbc20beb | 19 | extern Stepper RMot; |
| sype | 41:b5a2fbc20beb | 20 | extern Stepper ZMot; |
| sype | 41:b5a2fbc20beb | 21 | extern Stepper LMot; |
| sype | 41:b5a2fbc20beb | 22 | extern AnalogIn capt1; |
| sype | 41:b5a2fbc20beb | 23 | extern AnalogIn capt2; |
| sype | 41:b5a2fbc20beb | 24 | extern AnalogIn capt3; |
| sype | 44:b1fd7489369f | 25 | extern InterruptIn mybutton; |
| sype | 44:b1fd7489369f | 26 | extern InterruptIn EndR; |
| sype | 44:b1fd7489369f | 27 | extern InterruptIn EndZ; |
| sype | 44:b1fd7489369f | 28 | extern InterruptIn EndL; |
| sype | 44:b1fd7489369f | 29 | extern AX12 left_hand; |
| sype | 44:b1fd7489369f | 30 | extern AX12 right_hand; |
| sype | 45:b53ae54062c6 | 31 | extern Ticker ticker; |
| sype | 45:b53ae54062c6 | 32 | extern Odometry odo; |
| sype | 41:b5a2fbc20beb | 33 | |
| sype | 41:b5a2fbc20beb | 34 | extern int i, state; |
| sype | 41:b5a2fbc20beb | 35 | extern bool EL, EZ, ER; |
| sype | 41:b5a2fbc20beb | 36 | |
| sype | 41:b5a2fbc20beb | 37 | void ELpressed(void); |
| sype | 41:b5a2fbc20beb | 38 | void ELunpressed(void); |
| sype | 41:b5a2fbc20beb | 39 | void EZpressed(void); |
| sype | 41:b5a2fbc20beb | 40 | void EZunpressed(void); |
| sype | 41:b5a2fbc20beb | 41 | void ERpressed(void); |
| sype | 41:b5a2fbc20beb | 42 | void ERunpressed(void); |
| sype | 41:b5a2fbc20beb | 43 | |
| sype | 41:b5a2fbc20beb | 44 | void pressed(void); |
| sype | 41:b5a2fbc20beb | 45 | void unpressed(void); |
| sype | 41:b5a2fbc20beb | 46 | void JPO(void); |
| sype | 41:b5a2fbc20beb | 47 | |
| sype | 41:b5a2fbc20beb | 48 | void init_ax12(void); |
| sype | 44:b1fd7489369f | 49 | void init_interrupt(void); |
| sype | 41:b5a2fbc20beb | 50 | void goHome(void); |
| sype | 41:b5a2fbc20beb | 51 | void checkAround(void); |
| sype | 45:b53ae54062c6 | 52 | void update_main(void); |
| sype | 41:b5a2fbc20beb | 53 | |
| sype | 41:b5a2fbc20beb | 54 | #endif |
