![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
borrowed codes
Dependencies: mbed lib_FRC_2019
main.cpp@0:4902b3f17137, 2018-05-21 (annotated)
- Committer:
- haarkon
- Date:
- Mon May 21 16:17:02 2018 +0000
- Revision:
- 0:4902b3f17137
- Child:
- 2:e1372e7b671f
Canevas de programmation du festival de Robotique de Cachan
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
haarkon | 0:4902b3f17137 | 1 | #include "mbed.h" |
haarkon | 0:4902b3f17137 | 2 | #include "CMPS03.h" |
haarkon | 0:4902b3f17137 | 3 | #include "CNY70.h" |
haarkon | 0:4902b3f17137 | 4 | #include "GP2A.h" |
haarkon | 0:4902b3f17137 | 5 | #include "PID.h" |
haarkon | 0:4902b3f17137 | 6 | #include "Pixy.h" |
haarkon | 0:4902b3f17137 | 7 | #include "RC_Servo.h" |
haarkon | 0:4902b3f17137 | 8 | #include "VMA306.h" |
haarkon | 0:4902b3f17137 | 9 | |
haarkon | 0:4902b3f17137 | 10 | main () |
haarkon | 0:4902b3f17137 | 11 | { |
haarkon | 0:4902b3f17137 | 12 | Serial pc (USBTX, USBRX, 921600); |
haarkon | 0:4902b3f17137 | 13 | |
haarkon | 0:4902b3f17137 | 14 | CMPS03 boussole (PC_4, PB_9, PB_8); |
haarkon | 0:4902b3f17137 | 15 | |
haarkon | 0:4902b3f17137 | 16 | CNY70 ligneG (PC_3); |
haarkon | 0:4902b3f17137 | 17 | CNY70 ligneD (PC_2); |
haarkon | 0:4902b3f17137 | 18 | CNY70 mediane (PA_7); |
haarkon | 0:4902b3f17137 | 19 | |
haarkon | 0:4902b3f17137 | 20 | GP2A ld1 (PC_0, 20, 150, 60); |
haarkon | 0:4902b3f17137 | 21 | GP2A sd1 (PB_0, 7, 80, 20.88); |
haarkon | 0:4902b3f17137 | 22 | GP2A ld2 (PC_1, 20, 150, 60); |
haarkon | 0:4902b3f17137 | 23 | GP2A sd2 (PA_4, 7, 80, 20.88); |
haarkon | 0:4902b3f17137 | 24 | |
haarkon | 0:4902b3f17137 | 25 | PID motG (TIM4, PA_9, PC_9, PC_8); |
haarkon | 0:4902b3f17137 | 26 | PID motD (TIM3, PA_8, PC_6, PC_5); |
haarkon | 0:4902b3f17137 | 27 | |
haarkon | 0:4902b3f17137 | 28 | PIXY pixy (PA_1, PA_0); |
haarkon | 0:4902b3f17137 | 29 | |
haarkon | 0:4902b3f17137 | 30 | VMA306 us_G (PB_15, PA_6); |
haarkon | 0:4902b3f17137 | 31 | VMA306 us_B (PB_14, PC_7); |
haarkon | 0:4902b3f17137 | 32 | VMA306 us_D (PB_13, PB_2); |
haarkon | 0:4902b3f17137 | 33 | |
haarkon | 0:4902b3f17137 | 34 | AnalogIn vbat (PB_1); |
haarkon | 0:4902b3f17137 | 35 | |
haarkon | 0:4902b3f17137 | 36 | DigitalIn jack (PC_13); |
haarkon | 0:4902b3f17137 | 37 | |
haarkon | 0:4902b3f17137 | 38 | InterruptIn Vg (PA_11); |
haarkon | 0:4902b3f17137 | 39 | InterruptIn Vd (PA_10); |
haarkon | 0:4902b3f17137 | 40 | |
haarkon | 0:4902b3f17137 | 41 | DigitalOut led1 (PA_5); |
haarkon | 0:4902b3f17137 | 42 | DigitalOut led2 (PD_2); |
haarkon | 0:4902b3f17137 | 43 | DigitalOut disquette (PA_12); |
haarkon | 0:4902b3f17137 | 44 | |
haarkon | 0:4902b3f17137 | 45 | RC_Servo ballon (PB_10, 0); |
haarkon | 0:4902b3f17137 | 46 | RC_Servo verrou (PA_15, 0); |
haarkon | 0:4902b3f17137 | 47 | } |