Giter Site home page Giter Site logo

pi_romo's Introduction

pi_romo

Raspberry Pi Control library for 2nd generation Romotive protocol

Example use: To move the Romo forward for 1000 milliseconds use the 2x12 bit parameters below based on the Romotive protocol described further down. The second set of 12 bits are transmisted 12 milliseconds after the first in order to enable near simulataneous firing of the motors.

./hello_audio.bin 010000000001001111111111 1000


From prior Romotive notes:

We went back to the drawing board and completely revamped the firmware. The new protocol is a PWM signal sent over the audio channel that gives the robot 255 speeds on each motor, along with the ability to have each AUX channel go forward, back, and stop.

The PWM signal is comprised two channels, the left used for the clock signal and the right for the data signal. The PWM signal is generated as a square wave of 1000hz.

The left channel clock signal comprises of 12 bits. In order to trigger the circuit, the start the square wave has to be low. The peak of each wave denotes a bit. A full 12 bits denotes one command.

The right channel data signal comprises of first 3 bits for the address, the next 8 bits for the actual command, and the last bit as an even parity bit.

For the first 3 bits, the motor addresses are:

001 – Left motor 010 – Right Motor 011 – All 3 Auxiliary Motors For the next 8 bits, the commands range from 0 to 255.

0 (00000000) is full reverse 128 (10000000) is stop 255 (11111111) is full forward Any thing in between those values will give you a partial speed.

The last bit is a parity bit that keep the entire frame even. For example, if you have an address of 001 (left motor) and you want to send it in full reverse (00000000), the last bit has to be 1 to make the entire frame even. So the command for that would be 001000000001.

Each motor is triggered separately. It only seems that they move together because of the short duration of the audio signal sent.

pi_romo's People

Contributors

gcapiel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.