Update 'Follow_the_line/Programs /Follow_line_color_recognition.py'

This commit is contained in:
Tanja Sukal 2024-09-10 12:34:15 +00:00
parent 38e98e4dab
commit 07e4a65ef0

View File

@ -43,7 +43,7 @@ while True:
m_left.on(SpeedPercent(0)) m_left.on(SpeedPercent(0))
m_right.on(SpeedPercent(speed_percent_alone)) m_right.on(SpeedPercent(speed_percent_alone))
sleep(0.1) sleep(0.1)
elif cs_left.color == line_color and cs_right.color == line_color : #if both coloursensors detect the defined line-color, the robot stops because it has no direction elif cs_left.color == line_color and cs_right.color == line_color : #if both colour sensors detect the defined line-color, the robot stops because it has no direction
m_right.stop() m_right.stop()
m_left.stop() m_left.stop()
leds.set_color("LEFT", "RED") # both leds light red leds.set_color("LEFT", "RED") # both leds light red