![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
borrowed codes
Dependencies: mbed lib_FRC_2019
Diff: main.cpp
- Revision:
- 0:4902b3f17137
- Child:
- 2:e1372e7b671f
diff -r 000000000000 -r 4902b3f17137 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon May 21 16:17:02 2018 +0000 @@ -0,0 +1,47 @@ +#include "mbed.h" +#include "CMPS03.h" +#include "CNY70.h" +#include "GP2A.h" +#include "PID.h" +#include "Pixy.h" +#include "RC_Servo.h" +#include "VMA306.h" + +main () +{ +Serial pc (USBTX, USBRX, 921600); + +CMPS03 boussole (PC_4, PB_9, PB_8); + +CNY70 ligneG (PC_3); +CNY70 ligneD (PC_2); +CNY70 mediane (PA_7); + +GP2A ld1 (PC_0, 20, 150, 60); +GP2A sd1 (PB_0, 7, 80, 20.88); +GP2A ld2 (PC_1, 20, 150, 60); +GP2A sd2 (PA_4, 7, 80, 20.88); + +PID motG (TIM4, PA_9, PC_9, PC_8); +PID motD (TIM3, PA_8, PC_6, PC_5); + +PIXY pixy (PA_1, PA_0); + +VMA306 us_G (PB_15, PA_6); +VMA306 us_B (PB_14, PC_7); +VMA306 us_D (PB_13, PB_2); + +AnalogIn vbat (PB_1); + +DigitalIn jack (PC_13); + +InterruptIn Vg (PA_11); +InterruptIn Vd (PA_10); + +DigitalOut led1 (PA_5); +DigitalOut led2 (PD_2); +DigitalOut disquette (PA_12); + +RC_Servo ballon (PB_10, 0); +RC_Servo verrou (PA_15, 0); +} \ No newline at end of file