Control SG90 with PCA9685 with Banana pi m2 ultra

Hello,

I am trying to control SG90 servo with PCA9685 and banana pi m2 ultra. I don’t know how to access PCA9685 pins with gpio pins. I powered PCA9685 with 5V, and here is my connection: PCA9685 -> Banana pi m2 ultra VCC pin 1 (3.3 V) SDA pin 3 (SDA) SCL pin 5 (SCL) GND pin 9 (GND)

I have 3 SG90 servo; they care connected on 0, 1, 2 respectively on PCA9685.

Thank you

http://wiki.banana-pi.org/Getting_Started_with_M2_Ultra_%26_Berry#WringPi

Hello, you could try this: https://github.com/adafruit/Adafruit_Python_PCA9685

Hello,

Thanks you for replying! I followed that github but I am still not able to get them to move. This is the error I get:image2 I did some research and it was related to i2c, here is test on i2c: image1.

If I just touch the SG90 pins to pins on PCA9685, servo move 1 degree, which tells me that my servos are working.

Thank you for you time!

I had the same problem because my Banana Pi Zero has two i2c busses. By default, the PCA9685 library chooses the second one. However, the correct i2c bus would be the first one. You can fix this by specifying which bus you use: Adafruit_PCA9685.PCA9685(address=0x40, busnum=0).