The OC05 xChip is an 8-channel servo motor driver. It is based on the popular PCA9685 manufactured by NXP Semiconductor. It is supported by a BU33SD5 regulator to drive and accurately control up to 8 servo motors on a single module and act as system power supply. The module has 8 standard 2.54 mm (0.1") servo headers, plus 1 standard 2.54 mm (0.1") battery/BEC input header.
Download Mu-editor
- Use XinaBoxUploader and flash MicroPython to the CW01/CW02.
- Download Python packages from the REPL with the following code:
import network import upip sta_if = network.WLAN(network.STA_IF) sta_if.active(True) sta_if.connect("ssid", "password") upip.install("xinabox-OC05")
- Download the .UF2 file for CC03/CS11/CW03 CircuitPython and flash it to the board.
- TO DO
- TO DO
Requires Python 3
pip3 install xinabox-OC05
from xOC05 import xOC05
from xCore import xCore
# OC05 instance
OC05 = xOC05()
# configure OC05 with frequency of 60Hz
OC05.init(60)
while True:
OC05.setServoPosition(1, 0) # position servo to the right
xCore.sleep(50)
OC05.setServoPosition(1, 180) # position servo to the left
xCore.sleep(50)