car using PID from centre line
Dependencies: FRDM-TFC mbed CBuffer XBEE mbed_angular_speed motor2 MMA8451Q
Fork of KL25Z_Camera_Test by
Diff: main.cpp
- Revision:
- 1:a4883d9c75ec
- Parent:
- 0:566127ca8048
- Child:
- 2:4b6f6fc84793
diff -r 566127ca8048 -r a4883d9c75ec main.cpp --- a/main.cpp Fri Oct 14 10:56:56 2016 +0000 +++ b/main.cpp Fri Oct 14 15:55:16 2016 +0000 @@ -1,6 +1,6 @@ #include "mbed.h" #include "TFC.h" -#define CAM_THRESHOLD 3000 +//#define CAM_THRESHOLD 3000 DigitalOut myled(LED1); @@ -32,7 +32,7 @@ if(t==4) t=0; else - t++; + t++; TFC_SetBatteryLED_Level(t); for(i = 0; i < 128; i++) { @@ -40,6 +40,8 @@ printf("%02x", curr_line[i]); } printf("\n"); + + //Old version below, we don't threshold on the FRDM board anymore //printf("0x%x\n", curr_line); /* //Loop through camera pixels