logo

追球小车电机控制,怎么实现的转圈

2019-03-21 15:18
Y
u14w

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的区别是什么

2019-03-21 15:39
I
网红小智智 星瞳科技

区别就是转的正反。