repeat patrolcontinue along the route
Lesson / Robotics
The patrol route works until somebody moves a box into it. Add a distance check, choose a recovery action, and make the robot test the route again instead of turning forever.
Define a short patrol with a known start and stop rule.
Choose the signal and condition that interrupt the patrol.
Record the new state, act, and read the sensor again.
Test a corner, repeated obstacle, and recovery that might loop forever.
Show the sense-decide-act cycle and state one limit.
repeat patrolcontinue along the route
if obstacle neardecide when the plan must change
turn and check againmeasure after the correction
state = RECOVERINGrecord the current mode
Guided project
Patrol a route until an obstacle appears, then choose a response that does not involve turning forever in a corner.
A repeatable patrol, An obstacle signal, At least one response state, A correction and recheck.
Loops, Sensors, Conditions, State, Feedback.
A working version with a tested change, one repaired problem, and a clear explanation.