Code for the car to drive in a figure eight motion
Dependencies: mbed-rtos mbed MODSERIAL mbed-dsp telemetry
Diff: main.cpp
- Revision:
- 13:97708869a4ba
- Parent:
- 12:45e6cb021301
- Child:
- 14:09d61b20b102
- Child:
- 16:fa13ac00f583
--- a/main.cpp Fri Mar 20 03:34:38 2015 +0000 +++ b/main.cpp Fri Mar 20 04:04:04 2015 +0000 @@ -1,5 +1,4 @@ #include "mbed.h" -#include "telemetry.h" #include "rtos.h" // Camera Pins @@ -20,14 +19,23 @@ Mutex line_mutex; void linecam_thread(void const *args){ - while - line_mutex.lock(); + while(1){ + line_mutex.lock(); + pc.printf("["); + for(int i=0; i<128; i++){ + pc.printf("%f",line[i]); + pc.printf(" "); + } + pc.printf("]"); + } } int main() { Thread thread(linecam_thread); + thread.set_priority(osPriorityIdle); + //thread.set_priority(-3); while(1) {