Kuiper
23-06-2008, 16:31
Right now, I'm trying to create a program that commands a robot to move forward while constantly monitoring the status of two limit switches. If the left limit switch is pressed, the robot backs up and turns right before resuming forward motion, and if the right limit switch is pressed, the robot backs up and turns left before resuming forward motion. This is repeated infinitely (or until 5 stops being equal to 5). Only problem is that I'm getting a compile error:
Error[yy] Main.c line# 16 : syntax error
I've tried a various number of permutations of commands to try to download it and it seems that the problem may be with the User Code block (used in lines 15 and 20) in which I assign a value to a variable called "sum" equal to the sum of two variables known as "left" and "right".
Here's the program, both the EasyC window and the C window:
http://img356.imageshack.us/img356/3187/2bumpertestezckp1.png
http://img356.imageshack.us/img356/631/2bumpertestcim0.png
If anyone can shed some light on this matter, it would be much appreciated.
Error[yy] Main.c line# 16 : syntax error
I've tried a various number of permutations of commands to try to download it and it seems that the problem may be with the User Code block (used in lines 15 and 20) in which I assign a value to a variable called "sum" equal to the sum of two variables known as "left" and "right".
Here's the program, both the EasyC window and the C window:
http://img356.imageshack.us/img356/3187/2bumpertestezckp1.png
http://img356.imageshack.us/img356/631/2bumpertestcim0.png
If anyone can shed some light on this matter, it would be much appreciated.