关于电调的控制信号:电调信号是pwm信号,信号频率为50Hz,一个周期为20ms。对于电调来讲,高电平脉宽为1ms表示停转,高电平脉宽为2ms表示满油门运转;对于舵机来说1.5ms是归中,1ms和2ms分别为左右满舵。(因此下面才直接用Servo库来给实现ESC信号的输出)。
关于Servo.write()和Servo.writeMicroseconds()
0.Servo.writeMicroseconds(): Writes a value in microseconds (uS) tothe servo, controlling the shaft accordingly. On a standard servo, this willset the angle of the shaft. On standard servos a parameter value of 1000 isfully counter-clockwise, 2000 is fully clockwise, and 1500 is in the middle.
1.servo.write() allows a maximum of 180 servo positions
servo.writeMicroseconds() allows a maximum of 1000 servo positions
2.The 'write' method simply maps the'degrees' to microseconds and calls the 'writeMicroseconds'method anyway.
The 'degree' of turn is simply a convenientabstraction, and few bother to calibrate it.</