I have been following the 50$ robot tutorial and I have only the programming step left!
I added the Photovore_v1.c to source files under the AVR Studio, and followed the tutorial to the point of "Rebuild All"
At that point, I received 1 error and 3 warnings; the error being "expected identifier or '(' before while."
Here is the code that I copied and pasted in:
LED_off();//turn LED on
//store sensor data
//detects more light on left side of robot
if(sensor_left > sensor_right && (sensor_left - sensor_right) > threshold)
//detects more light on right side of robot
else if(sensor_right > sensor_left && (sensor_right - sensor_left) > threshold)
//light is about equal on both sides
/* Servo Test Code
//output message to serial (use hyperterminal)
//print("Hello, World! Read My Analog: %u\r\n", sensor_0);
delay_cycles(500);//a small delay to prevent crazy oscillations
My Intuition of my issue:
I have little knowledge of C; I am somewhat conversant in Python and Basic, I would think there must be "definitions" or parameters that I am missing. The code above is simply the bit that the downloaded Photovore_v1.c file shows to be added.
Any help is appreciated!