Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
我用颜色识别控制小车的例子,使用PWM波控制小车,范围1000us到2000us。调节P变大,但不能保证h_output ± x_output范围在1000~2000之间,该怎么办呢
写一个if else就行了吧。
if a> 2000: a = 2000 if a< 1000: a = 1000