Skip to main content

PWM Servo Driver Python Package

This package provides a Python interface for controlling servos using Pulse Width Modulation (PWM).

Prerequisites

This library requires the sx1509-gpio-expander library. You can install it using pip:

pip install sx1509-gpio-expander

Installation

Install the package using pip:

pip install pwm-servo-driver

Usage

from sx1509_gpio_expander import SX1509
from pwm_servo_driver import Servo
import board

# Configure I2C
i2c = board.I2C() 

# Create an instance of the SX1509 GPIO expander
IOExpander0 = SX1509.SX1509(i2c, 0x3F)

# Create an instance of the PWM servo driver
# The parameters are the IO expander, and the pin number for the servo
servo = Servo.Servo(IOExpander0, 1)

# Use the servo driver
# The setPosition function sets the servo angle
# Just set the angle to a value between (0-180) and the function will automatically adjust the PWM signal
servo.setPosition(90)

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE - see the LICENSE file for details.

Release files for pwm-servo-driver 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pwm-servo-driver 0.1.0
File Size Uploaded
pwm_servo_driver-0.1.0.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pwm-servo-driver 0.1.0
File Interpreter ABI Platform
pwm_servo_driver-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size:30.5 kB

Release files / pwm_servo_driver-0.1.0.tar.gz

Download URL pwm_servo_driver-0.1.0.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8bb5fd5093aea338d9ab7066c6c901090cdecfc44e9dc116953aca41eb2933cd
BLAKE2b-256 checksum
How to use checksums
ff5d780b9d63ea46856d803fdd0f82bcd84240541ff77ac8cb51b503a2334a7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.0

Release files / pwm_servo_driver-0.1.0-py2.py3-none-any.whl

Download URL pwm_servo_driver-0.1.0-py2.py3-none-any.whl
Size 15.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5ce8f9b38562c89add8190b11cf65552aa6d22fd9d48d22b28951dbae99509e4
BLAKE2b-256 checksum
How to use checksums
26aab4d359d2a37c5be56f69f3dc8ba7c2f69b12485720972c5af2df8cb06917
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page