![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Tutorial for first mbed project
Dependencies: mbed lib_workshop_2019
includes/pin_connexions.h@0:0a75a79d6b77, 2019-10-23 (annotated)
- Committer:
- gvaquette
- Date:
- Wed Oct 23 12:16:18 2019 +0000
- Revision:
- 0:0a75a79d6b77
- Child:
- 1:7a8764e627b5
console_ouput
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gvaquette | 0:0a75a79d6b77 | 1 | #define BOUSSOLE_adress 0xC0 |
gvaquette | 0:0a75a79d6b77 | 2 | #define PIXY_adress 0x54 |
gvaquette | 0:0a75a79d6b77 | 3 | |
gvaquette | 0:0a75a79d6b77 | 4 | #define CC_BLOCSIZE 14 |
gvaquette | 0:0a75a79d6b77 | 5 | #define N_BLOCSIZE 12 |
gvaquette | 0:0a75a79d6b77 | 6 | |
gvaquette | 0:0a75a79d6b77 | 7 | #define N_BLOCCODE 0xAA55 |
gvaquette | 0:0a75a79d6b77 | 8 | #define CC_BLOCCODE 0xAA56 |
gvaquette | 0:0a75a79d6b77 | 9 | |
gvaquette | 0:0a75a79d6b77 | 10 | |
gvaquette | 0:0a75a79d6b77 | 11 | typedef unsigned char Byte; |
gvaquette | 0:0a75a79d6b77 | 12 | typedef unsigned short Word; |
gvaquette | 0:0a75a79d6b77 | 13 | typedef unsigned long lWord; |
gvaquette | 0:0a75a79d6b77 | 14 | |
gvaquette | 0:0a75a79d6b77 | 15 | Serial Pc (PA_2, PA_3, 115200); |
gvaquette | 0:0a75a79d6b77 | 16 | |
gvaquette | 0:0a75a79d6b77 | 17 | /****************************************/ |
gvaquette | 0:0a75a79d6b77 | 18 | /** CNY declarations **/ |
gvaquette | 0:0a75a79d6b77 | 19 | /* To be completed */ |
gvaquette | 0:0a75a79d6b77 | 20 | |
gvaquette | 0:0a75a79d6b77 | 21 | AnalogIn CNY1 (PA_7); |
gvaquette | 0:0a75a79d6b77 | 22 | AnalogIn CNY2 (PC_2); |
gvaquette | 0:0a75a79d6b77 | 23 | AnalogIn CNY3 (PC_3); |
gvaquette | 0:0a75a79d6b77 | 24 | |
gvaquette | 0:0a75a79d6b77 | 25 | /** End of CNY declaration **/ |
gvaquette | 0:0a75a79d6b77 | 26 | /****************************************/ |
gvaquette | 0:0a75a79d6b77 | 27 | |
gvaquette | 0:0a75a79d6b77 | 28 | |
gvaquette | 0:0a75a79d6b77 | 29 | /****************************************/ |
gvaquette | 0:0a75a79d6b77 | 30 | /** Motor by PWM declarations **/ |
gvaquette | 0:0a75a79d6b77 | 31 | /* To be completed */ |
gvaquette | 0:0a75a79d6b77 | 32 | |
gvaquette | 0:0a75a79d6b77 | 33 | DigitalOut DIR_1G (PC_9); |
gvaquette | 0:0a75a79d6b77 | 34 | DigitalOut DIR_2G (PC_8); |
gvaquette | 0:0a75a79d6b77 | 35 | DigitalOut DIR_1D (PC_6); |
gvaquette | 0:0a75a79d6b77 | 36 | DigitalOut DIR_2D (PC_5); |
gvaquette | 0:0a75a79d6b77 | 37 | |
gvaquette | 0:0a75a79d6b77 | 38 | PwmOut Pwm_MG (PA_9); |
gvaquette | 0:0a75a79d6b77 | 39 | PwmOut Pwm_MD (PA_8); |
gvaquette | 0:0a75a79d6b77 | 40 | |
gvaquette | 0:0a75a79d6b77 | 41 | /** End of Motor by PWM declarations **/ |
gvaquette | 0:0a75a79d6b77 | 42 | /****************************************/ |
gvaquette | 0:0a75a79d6b77 | 43 | |
gvaquette | 0:0a75a79d6b77 | 44 |