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.
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.