追球小车电机控制,怎么实现的转圈
-
if left_speed < 0:
ain1.low()
ain2.high()
else:
ain1.high()
ain2.low()
ch1.pulse_width_percent(abs(left_speed))if right_speed < 0:
bin1.low()
bin2.high()
else:
bin1.high()
bin2.low()
ch2.pulse_width_percent(abs(right_speed))
这段代码当left_speed<0时,小车会怎么运动
left_speed<0和left_speed>0的区别是什么
-
区别就是转的正反。