Skip to main content

Arduino-style servo control using PyFirmata2

Project description

servo-like-arduino

Arduino-style servo control for Python using PyFirmata2.

Installation

pip install pyfirmata2
pip install servo-like-arduino

Arduino Setup

Upload StandardFirmata to your Arduino:

File → Examples → Firmata → StandardFirmata

Quick Start

from servo_like_arduino import *

Board('/dev/ttyUSB0')

servo = Servo()
servo.attach(9)

servo.write(90)

Smooth Movement

servo.move_smooth(180)

Sweep

servo.sweep(
    start=0,
    end=180,
    step=1,
    delay_ms=15
)

Features

  • Arduino-style syntax
  • Servo control
  • Smooth movement
  • Sweep functionality
  • delay()
  • millis()
  • Built on PyFirmata2

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

servo_like_arduino-0.2.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

servo_like_arduino-0.2.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file servo_like_arduino-0.2.0.tar.gz.

File metadata

  • Download URL: servo_like_arduino-0.2.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for servo_like_arduino-0.2.0.tar.gz
Algorithm Hash digest
SHA256 86898ef7c96a57f7a05781ce9b8f60985e22112cccad0ab2473440cda577569b
MD5 5dc94fd269d2835b4182e8a1e23ac318
BLAKE2b-256 4fe512fc8b5f28601d7ab9c397cbffba8f368276ccca735a777452050efe4f1e

See more details on using hashes here.

File details

Details for the file servo_like_arduino-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for servo_like_arduino-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a86b3b22bf56c3c75830ad85cb383ae198014e00009ce21ca24ef5caa8e9528
MD5 c975e8f1f0f8ff8b8b5f46d0e367ba03
BLAKE2b-256 0608a4e6c34e4de7f0782f3427e22bd1f0bad617e905d3af692801f2c20dad66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page