ui.ui_linefollow module¶
Line-following activation screen for the Romi robot UI.
Starts the autonomous line-following mode by enabling the reflectance sensor
array, both motors, and the line-following controller. While running, sensor
telemetry is streamed between CSV_BEGIN / CSV_END markers so the host
can log data. The user presses Enter to stop, at which point all actuators
and the controller are disabled and setpoints are zeroed.
- ui.ui_linefollow.run(ui)[source]¶
Generator that manages the full lifecycle of one line-following session.
- Sequence:
Enable reflectance sensor (mode 3) and both motors.
Yield once to let the sensor task pick up the mode change.
Enable the line-following controller.
Write
CSV_BEGINmarker and enter a non-blocking wait loop.On Enter / Return: break, write
CSV_END, disable everything.
- Args:
- ui: UI context object exposing
_ser,_reflectanceMode, _leftMotorGo,_rightMotorGo,_lineFollowGo,_leftMotorSetPoint, and_rightMotorSetPointshares/queues.
- ui: UI context object exposing
- Yields:
int:
0on every loop iteration to cooperate with the scheduler.