问题
Got this board cheap from Banggood, but there are minimal details on how to use it. There is a manual here https://www.gitbook.com/book/smartarduino/user-manual-for-2-way-motor-16-way-servos-shield/details , but it is a long way from detailed, and what I need are some details on how to drive the I2C PWM servos.
回答1:
After some poking around, I have a partial answer.
The Adafruit libraries seem to work fine for the servos. https://learn.adafruit.com/16-channel-pwm-servo-driver/using-the-adafruit-library
Motors on this version of the board have the following controls: D6 PWMB - speed channel B D7 DIRB - Direction Channel B D8 PWMA - Speed Channel A D9 DIRA - Direction Channel A
... which may explain why the speed control is working on channel B but not A, since pin 8 is not PWM on a UNO. (May also explain why it is cheap)
Also note that you need to supply a separate 5V to 18V power to the VS connector to drive the servos. I used a 6v battery pack.
Also note that the on-board power switch did not appear to affect power to servo, so a power switch for the servo power is probably also useful.
来源:https://stackoverflow.com/questions/41327327/doit-2-way-motor-16-way-servo-shield-board