Coder Social home page Coder Social logo

brjapon / maestro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from therobotacademy/maestro

0.0 1.0 0.0 2.55 MB

Python class to support Pololu's Maestro servo controller over USB serial. Great with Raspberry Pi.

License: MIT License

Python 99.77% Shell 0.23%

maestro's Introduction

maestro.py

This Python class supports Pololu's Maestro servo controller over USB serial. Great for use with the Raspberry Pi.

The class includes methods to control servos (position, speed, acceleration), read servo position, and start/stop Maestro scripts. See Pololu's on-line documentation to learn about the full capabilities of this nifty micro-controller.

Pololu's Maestro Windows installer sets up the Maestro Control Center, used to configure, test and program the controller. Be sure the Maestro is configured for "USB Dual Port" serial mode. I believe the controller is setup in this mode by default by default, so it shouldn't be necessary to use the Control Center application.

You'll need to have the 'pyserial' Python module installed to use maestro.py.

For Linux, download pyserial-2.7.tar.gz from http://sourceforge.net/projects/pyserial/files/pyserial/

wget http://sourceforge.net/projects/pyserial/files/pyserial/2.7/pyserial-2.7.tar.gz

and then install

tar –zxf pyserial-2.7.tar.gz
cd pyserial-2.7
sudo python setup.py install

Example usage of maestro.py:

import maestro.py
servo = maestro.Controller()
servo.setAccel(0,4)      #set servo 0 acceleration to 4
servo.setTarget(0,6000)  #set servo to move to center position
servo.close

maestro's People

Contributors

frc4564 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.