Skip to main content

General python support for single and dual motor controllers.

Project description

docs

Documentation Status

package

PyPI Package latest release PyPI Wheel Supported versions

General python support for single and dual motor controllers.

  • Free software: MIT License

Installation

pip install robot-motor-controller

You can also install the in-development version with:

pip install https://github.com/fmorton/robot-python-hummingbird/archive/main.zip

Motor Controller Example with a Birdbrain Hummingbird

from robot.hummingbird import Hummingbird
from robot.l298n_dual_motor_controller import L298nDualMotorController
from time import sleep

hummingbird = Hummingbird()

motors = L298nDualMotorController(hummingbird)

motors.move_left_motor(40)  # left motor forward
sleep(1.0)
motors.move_left_motor(0)  # stop left motor

motors.move_right_motor(-40)  # right motor backwards
sleep(1.0)

motors.move(50, 50)  # move both motors forward
sleep(1.0)

motors.stop()

Testing

To run all the tests run:

pytest

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

robot_motor_controller-0.9.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

robot_motor_controller-0.9.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file robot_motor_controller-0.9.0.tar.gz.

File metadata

  • Download URL: robot_motor_controller-0.9.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for robot_motor_controller-0.9.0.tar.gz
Algorithm Hash digest
SHA256 6a603d9928b74d51a33fdb8772e7e3dacd86620decee4e944ec5340d5e2c9bb5
MD5 449fbdbf3c70c30a97fadbb567bc34f7
BLAKE2b-256 47a2f942a36744398e2430fe454a39183bd0a50c5927049ceeadb1b21c61f017

See more details on using hashes here.

File details

Details for the file robot_motor_controller-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for robot_motor_controller-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c1eb99086a509acf225545a6e76561df12ddb80eb23a9e88a40c8ea1e0c6ac2
MD5 9b1230b521a9636f6d72f414d93cc866
BLAKE2b-256 05475f7a26bf15859d9f3ec5518f0b350200dbb4e1b9c71a9562080106e71ca3

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