PDA

View Full Version : Obstacle Avoidance



christine
- 16th May 2013, 21:23
Hi,

pls I urgently need help with my code. I am using Amicus18 and the language is BASIC. I have used the ADIn to calculate the voltages for the four IR sensors and converted to distance by plotting the Distance/voltage curve and using the line equation to determine the distances with the assciated voltages but I have tried many days to let the robot appraoch an object and stop but it just can't stop. The code I write for that portion is If D_L1 >=15 Then turn left : ELSEIF D_R1>=15 Then turn left : ELSE : GoTo forward. What do I have to do to get it stop. It can reverse, it can turn left and right but it cannot stop when it gets to an obstacle. Thank you for your help.

mackrackit
- 17th May 2013, 13:23
If you are using the free compiler for the Amicus 18 go here
http://www.myamicus.co.uk/

If you are using Pic Basic Pro then post your code.

stive951
- 27th August 2013, 12:14
I cannot get this example code to compile - syntax error after step 2 . I tried several different versions of the statement, but no luck.