Society of Robots - Robot Forum
Software => Software => Topic started by: SUTO the G on February 27, 2013, 08:40:44 AM
-
How does this "if(scan_angle > 57) robot_turn_left();" make sense? when scan_angle`s max value is 57.
-
if (sharp_IR_reading > scan_thresh)//object detected
{
if (scan_angle>41) //overflow protection
scan_angle-=2;//scan right
}
Here why do we need to make that overflow protection? I mean couldn`t we just say
if (sharp_IR_reading > scan_thresh)//object detected
{
scan_angle=scan_angle
}
-
Please do not double post.
Your answer is here:
http://www.societyofrobots.com/robotforum/index.php?topic=8420.msg116891#msg116891 (http://www.societyofrobots.com/robotforum/index.php?topic=8420.msg116891#msg116891)
When the angle is at 57, the robot will turn left. :P
(not sure what your question is exactly)