![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Test code 29-10-2019
Dependencies: mbed RC_Servo VMA306 PID CNY70 CMPS03 GP2A Pixy
main.cpp@8:2d4887624f94, 2019-10-24 (annotated)
- Committer:
- haarkon
- Date:
- Thu Oct 24 13:21:27 2019 +0000
- Revision:
- 8:2d4887624f94
- Parent:
- 7:6d58adc26b78
- Child:
- 9:4053b5217339
Ready to go
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 "RC_Servo.h" |
haarkon | 0:4902b3f17137 | 6 | #include "VMA306.h" |
haarkon | 3:0221daeeaa86 | 7 | #include "Pixy.h" |
haarkon | 4:5038b4cd1088 | 8 | #include "PID.h" |
haarkon | 4:5038b4cd1088 | 9 | |
haarkon | 4:5038b4cd1088 | 10 | #define PI 3.1415926535898 |
haarkon | 0:4902b3f17137 | 11 | |
haarkon | 8:2d4887624f94 | 12 | Serial pc (PA_2, PA_3, 115200); |
haarkon | 7:6d58adc26b78 | 13 | PID motor (TIM4, TIM3, PA_9, PA_8, PC_9, PC_8, PC_6, PC_5); |
haarkon | 0:4902b3f17137 | 14 | |
haarkon | 3:0221daeeaa86 | 15 | CMPS03 boussole (PC_4); |
haarkon | 0:4902b3f17137 | 16 | |
haarkon | 3:0221daeeaa86 | 17 | CNY70 ligneD (PC_3); |
haarkon | 3:0221daeeaa86 | 18 | CNY70 ligneG (PC_2); |
haarkon | 3:0221daeeaa86 | 19 | CNY70 exterior (PA_7); |
haarkon | 0:4902b3f17137 | 20 | |
haarkon | 8:2d4887624f94 | 21 | VMA306 ultraSon (PB_15, PA_6, PB_14, PC_7, PB_13, PB_2); |
haarkon | 0:4902b3f17137 | 22 | |
haarkon | 8:2d4887624f94 | 23 | PIXY pixy (PA_0, PA_1, 115200); |
haarkon | 0:4902b3f17137 | 24 | |
haarkon | 8:2d4887624f94 | 25 | InterruptIn bp (PC_13); |
haarkon | 4:5038b4cd1088 | 26 | |
haarkon | 0:4902b3f17137 | 27 | DigitalOut led1 (PA_5); |
haarkon | 0:4902b3f17137 | 28 | DigitalOut led2 (PD_2); |
haarkon | 8:2d4887624f94 | 29 | DigitalOut unused1 (PB_10); |
haarkon | 8:2d4887624f94 | 30 | DigitalOut unused2 (PA_15); |
haarkon | 8:2d4887624f94 | 31 | DigitalOut unused3 (PA_12); |
haarkon | 8:2d4887624f94 | 32 | |
haarkon | 8:2d4887624f94 | 33 | DigitalIn unused4 (PA_4, PullUp); |
haarkon | 8:2d4887624f94 | 34 | DigitalIn unused5 (PB_0, PullUp); |
haarkon | 8:2d4887624f94 | 35 | DigitalIn unused6 (PC_1, PullUp); |
haarkon | 8:2d4887624f94 | 36 | DigitalIn unused7 (PC_0, PullUp); |
haarkon | 8:2d4887624f94 | 37 | |
haarkon | 8:2d4887624f94 | 38 | Timer temps; |
haarkon | 0:4902b3f17137 | 39 | |
haarkon | 3:0221daeeaa86 | 40 | main () |
haarkon | 3:0221daeeaa86 | 41 | { |
haarkon | 3:0221daeeaa86 | 42 | |
haarkon | 3:0221daeeaa86 | 43 | while (1) { |
haarkon | 3:0221daeeaa86 | 44 | } |
haarkon | 0:4902b3f17137 | 45 | } |