Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

Latest commit

 

History

History
38 lines (27 loc) · 865 Bytes

File metadata and controls

38 lines (27 loc) · 865 Bytes

icsservo

Travis (.org) PyPI PyPI - License C++

ICSServo: ICS serial servo driver library

Install

pip install icsservo

Serial port setup

Raspberry Pi 3 B

# Disable Bluetooth and Enable PL011 uart.
# MiniUART cannot be used because it does not support parity.
# https://www.raspberrypi.org/documentation/configuration/uart.md
echo 'dtoverlay=pi3-miniuart-bt' | sudo tee -a /boot/config.txt

# Reboot to apply changes
sudo reboot

Usage

from icsservo import IOProvider

with IOProvider(device="/dev/serial0", en_idx=23) as io:
  servo = io.servo(1) # Servo with ID 1
  servo.set_position(3.14 / 2)