Tested Line Following with different track shape
This commit is contained in:
parent
3db1a54419
commit
be642d6857
@ -41,12 +41,12 @@ while True:
|
||||
m_l_speed_percent= max_speed_percent*cs_l_percent
|
||||
m_r_speed_percent= max_speed_percent*cs_r_percent
|
||||
# make sure percentage is not higher than possible (100%) and signal it through lights
|
||||
if m_l_speed_percent >= 100:
|
||||
if m_l_speed_percent > 100:
|
||||
m_l_speed_percent = 0
|
||||
leds.set_color("LEFT", "AMBER")
|
||||
else:
|
||||
leds.set_color("LEFT", "GREEN")
|
||||
if m_r_speed_percent >= 100:
|
||||
if m_r_speed_percent > 100:
|
||||
m_r_speed_percent = 0
|
||||
leds.set_color("RIGHT", "AMBER")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user