Scripts to control servos in pan-tilt configuration with Raspberry Pi
Project description
piservopantilt
Initial code to control Raspberry Pi with camera setup on 2-axis servo controlled arm.
Usage
from piservopantilt import ServoControl
s = ServoControl(pan_limits=(650,2500),tilt_limits=(650,2250))
# Move to 0,0
s.min()
# Move to 180,180
s.max()
# Move to specific coordinates
s.move_to(180,0)
Testing
Run unit tests with command:
python3 -m unittest discover -s piservopantilt/tst/
Get test coverage with commands:
coverage run -m unittest discover -s piservopantilt/tst/
coverage report -m
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
piservopantilt-0.1.0.tar.gz
(2.6 kB
view hashes)