12. 12
Algorithm
1st
If Block
• Reads from Infrared Sensor
• Checks if there is a wall on the right
− Reading of less than 15 indicates that wall is present
Comments
17. 17
Algorithm
Medium Motor Turn Right Block
• Medium motor holds the infrared sensor
• Turns medium motor to the right
− Add 90 to reading to get rid of drift
• Uses proportional gain of 0.5 to reduce accumulated error
Comments
18. 18
Algorithm
Medium Motor Turn Left Block
• Turns medium motor to the left
− Subtract 90 from reading to get rid of drift
• Uses proportional gain of 0.5 to reduce accumulated error
Comments
22. 22
Result
Robot’s Escape Route on Matlab
• Red and straight lines show the borders of the
maze
− Achieved by combining direction information
• Blue and dashed lines show the route that our
robot traveled only once
• Blue and straight lines show the route that our
robot traveled back and forth
− Achieved by combining position and direction
information
Comments