![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Tuk tutoriail
Dependencies: mbed lib_workshop_2019
includes/pin_connexions.h@1:7a8764e627b5, 2019-10-23 (annotated)
- Committer:
- gvaquette
- Date:
- Wed Oct 23 13:01:35 2019 +0000
- Revision:
- 1:7a8764e627b5
- Parent:
- 0:0a75a79d6b77
- Child:
- 5:d99659a45cab
test ULTRASONIC and COMPASS
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gvaquette | 1:7a8764e627b5 | 1 | #ifndef PINCONNEXIONS_H |
gvaquette | 1:7a8764e627b5 | 2 | #define PINCONNEXIONS_H |
gvaquette | 1:7a8764e627b5 | 3 | |
gvaquette | 1:7a8764e627b5 | 4 | #include "VMA306.h" |
gvaquette | 1:7a8764e627b5 | 5 | #include "CMPS03.h" |
gvaquette | 1:7a8764e627b5 | 6 | |
gvaquette | 1:7a8764e627b5 | 7 | #define COMPASS_adress 0xC0 |
gvaquette | 0:0a75a79d6b77 | 8 | #define PIXY_adress 0x54 |
gvaquette | 0:0a75a79d6b77 | 9 | |
gvaquette | 0:0a75a79d6b77 | 10 | #define CC_BLOCSIZE 14 |
gvaquette | 0:0a75a79d6b77 | 11 | #define N_BLOCSIZE 12 |
gvaquette | 0:0a75a79d6b77 | 12 | |
gvaquette | 0:0a75a79d6b77 | 13 | #define N_BLOCCODE 0xAA55 |
gvaquette | 0:0a75a79d6b77 | 14 | #define CC_BLOCCODE 0xAA56 |
gvaquette | 0:0a75a79d6b77 | 15 | |
gvaquette | 0:0a75a79d6b77 | 16 | |
gvaquette | 0:0a75a79d6b77 | 17 | typedef unsigned char Byte; |
gvaquette | 0:0a75a79d6b77 | 18 | typedef unsigned short Word; |
gvaquette | 0:0a75a79d6b77 | 19 | typedef unsigned long lWord; |
gvaquette | 0:0a75a79d6b77 | 20 | |
gvaquette | 0:0a75a79d6b77 | 21 | Serial Pc (PA_2, PA_3, 115200); |
gvaquette | 0:0a75a79d6b77 | 22 | |
gvaquette | 0:0a75a79d6b77 | 23 | /****************************************/ |
gvaquette | 0:0a75a79d6b77 | 24 | /** CNY declarations **/ |
gvaquette | 0:0a75a79d6b77 | 25 | /* To be completed */ |
gvaquette | 0:0a75a79d6b77 | 26 | |
gvaquette | 0:0a75a79d6b77 | 27 | AnalogIn CNY1 (PA_7); |
gvaquette | 0:0a75a79d6b77 | 28 | AnalogIn CNY2 (PC_2); |
gvaquette | 0:0a75a79d6b77 | 29 | AnalogIn CNY3 (PC_3); |
gvaquette | 0:0a75a79d6b77 | 30 | |
gvaquette | 0:0a75a79d6b77 | 31 | /** End of CNY declaration **/ |
gvaquette | 0:0a75a79d6b77 | 32 | /****************************************/ |
gvaquette | 0:0a75a79d6b77 | 33 | |
gvaquette | 0:0a75a79d6b77 | 34 | |
gvaquette | 0:0a75a79d6b77 | 35 | /****************************************/ |
gvaquette | 0:0a75a79d6b77 | 36 | /** Motor by PWM declarations **/ |
gvaquette | 0:0a75a79d6b77 | 37 | /* To be completed */ |
gvaquette | 0:0a75a79d6b77 | 38 | |
gvaquette | 1:7a8764e627b5 | 39 | DigitalOut DIR_1G (PC_9); |
gvaquette | 1:7a8764e627b5 | 40 | DigitalOut DIR_2G (PC_8); |
gvaquette | 1:7a8764e627b5 | 41 | DigitalOut DIR_1D (PC_6); |
gvaquette | 1:7a8764e627b5 | 42 | DigitalOut DIR_2D (PC_5); |
gvaquette | 0:0a75a79d6b77 | 43 | |
gvaquette | 1:7a8764e627b5 | 44 | PwmOut Pwm_MG (PA_9); |
gvaquette | 1:7a8764e627b5 | 45 | PwmOut Pwm_MD (PA_8); |
gvaquette | 0:0a75a79d6b77 | 46 | |
gvaquette | 0:0a75a79d6b77 | 47 | /** End of Motor by PWM declarations **/ |
gvaquette | 0:0a75a79d6b77 | 48 | /****************************************/ |
gvaquette | 0:0a75a79d6b77 | 49 | |
gvaquette | 1:7a8764e627b5 | 50 | /* Proximity sensors */ |
gvaquette | 1:7a8764e627b5 | 51 | VMA306 ultra_sonic (PB_13, PB_2, PB_14, PC_7, PB_15, PA_6); |
gvaquette | 0:0a75a79d6b77 | 52 | |
gvaquette | 1:7a8764e627b5 | 53 | /* Compass sensor */ |
gvaquette | 1:7a8764e627b5 | 54 | CMPS03 compass (PC_4); |
gvaquette | 1:7a8764e627b5 | 55 | |
gvaquette | 1:7a8764e627b5 | 56 | #endif /* PINCONNEXIONS_H */ |