Code for the car to drive in a figure eight motion
Dependencies: mbed-rtos mbed MODSERIAL mbed-dsp telemetry
main.cpp
- Committer:
- ericoneill
- Date:
- 2015-03-20
- Revision:
- 11:f8aa39c19477
- Parent:
- 10:85f486ad4e5f
- Child:
- 12:45e6cb021301
File content as of revision 11:f8aa39c19477:
#include "mbed.h" #include "telemetry.h" #include "rtos.h" // Camera Pins DigitalOut clk(PTA13); DigitalOut si(PTD4); AnalogIn camData(PTC2); //Servo, Motor, Serial Pins PwmOut servo(PTA5); PwmOut motor1(PTA4); PwmOut motor2(PTA12); DigitalOut break1(PTC12); DigitalOut break2(PTC13); Serial pc(USBTX, USBRX); // Interrupt for encoder InterruptIn interrupt(PTA13); void read_sensors(){ } void actuate(){ } void linecam_thread(void const *args){ } int main() { Thread thread(linecam_thread); Encoder encoder = while(1) { read_sensors(); actuate(); } }