Code for the car to drive in a figure eight motion

Dependencies:   mbed-rtos mbed MODSERIAL mbed-dsp telemetry

Committer:
ericoneill
Date:
Thu Mar 19 05:18:52 2015 +0000
Revision:
5:764c2ffb523a
Parent:
4:03594bf9a0de
Child:
10:85f486ad4e5f
encoder class framework

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ericoneill 0:2002d645d2a6 1 #include "mbed.h"
ericoneill 2:3eb545c3e6a1 2 #include "telemetry.h"
ericoneill 2:3eb545c3e6a1 3 #include "rtos.h"
ericoneill 0:2002d645d2a6 4
ericoneill 2:3eb545c3e6a1 5 // Camera Pins
ericoneill 2:3eb545c3e6a1 6 DigitalOut clk(PTA13);
ericoneill 2:3eb545c3e6a1 7 DigitalOut si(PTD4);
ericoneill 2:3eb545c3e6a1 8 AnalogIn camData(PTC2);
ericoneill 2:3eb545c3e6a1 9 //Servo, Motor, Serial Pins
ericoneill 2:3eb545c3e6a1 10 PwmOut servo(PTA5);
ericoneill 2:3eb545c3e6a1 11 PwmOut motor(PTA4);
ericoneill 2:3eb545c3e6a1 12 Serial pc(USBTX, USBRX);
ericoneill 2:3eb545c3e6a1 13 // Interrupt for encoder
ericoneill 2:3eb545c3e6a1 14 InterruptIn interrupt(PTA13);
ericoneill 0:2002d645d2a6 15
ericoneill 4:03594bf9a0de 16 void read_sensors(){
ericoneill 4:03594bf9a0de 17
ericoneill 4:03594bf9a0de 18 }
ericoneill 4:03594bf9a0de 19
ericoneill 4:03594bf9a0de 20 void actuate(){
ericoneill 4:03594bf9a0de 21
ericoneill 4:03594bf9a0de 22 }
ericoneill 4:03594bf9a0de 23 void linecam_thread(void const *args){
ericoneill 5:764c2ffb523a 24
ericoneill 4:03594bf9a0de 25 }
ericoneill 4:03594bf9a0de 26
ericoneill 4:03594bf9a0de 27
ericoneill 0:2002d645d2a6 28 int main() {
ericoneill 4:03594bf9a0de 29 Thread thread(linecam_thread);
ericoneill 0:2002d645d2a6 30 while(1) {
ericoneill 4:03594bf9a0de 31 read_sensors();
ericoneill 4:03594bf9a0de 32 actuate();
ericoneill 0:2002d645d2a6 33 }
ericoneill 0:2002d645d2a6 34 }