Support in Cayenne IOT framework

I've just got my Zeroborg up and running with the example scripts and everything seems to be fine - are there any plans to link it to the Cayenne IoT framework that has been in the press recently or can it be done via calling out to python scripts ?

piborg's picture

I do not really know much about how the framework behaves under the covers.

Anything which is capable of send I2C messages will be able to talk with the ZeroBorg.
This could be done with Python scripts or any programming language which can talk to the I2C bus.

We have a large amount of development going on at the moment with the first Formula Pi series soon to start and some new robots on the way.
Because of this we do not really have the time to do development for other frameworks sadly.
We can provide help to someone who is willing to give it a go though ^_^

Do you have a document on the messages that are sent over I2C for the example program with the sliders I'm really only interested in basic motor control functions

Do you have a document on the messages that are sent over I2C for the example program with the sliders I'm really only interested in basic motor control functions

piborg's picture

We do not have any simple documentation for the I2C commands.
What we do have is a fairly simple example implementation in ZeroBorg.py

The functions for controlling the individual motor outputs are:
SetMotor1, SetMotor2, SetMotor3, and SetMotor4.

The I2C address of the ZeroBorg by default is 64 (0x40) by default.

The I2C messages sent by the functions above all share the same two byte pattern:

  1. Command code
  2. Power level

The power level is between 0 for 0% (off) and 255 for 100% (full speed).
The command codes are:

COMMAND_SET_A_FWD       = 3     # Set motor 1 PWM rate in a forwards direction
COMMAND_SET_A_REV       = 4     # Set motor 1 PWM rate in a reverse direction
COMMAND_SET_B_FWD       = 6     # Set motor 2 PWM rate in a forwards direction
COMMAND_SET_B_REV       = 7     # Set motor 2 PWM rate in a reverse direction
COMMAND_SET_C_FWD       = 9     # Set motor 3 PWM rate in a forwards direction
COMMAND_SET_C_REV       = 10    # Set motor 3 PWM rate in a reverse direction
COMMAND_SET_D_FWD       = 12    # Set motor 4 PWM rate in a forwards direction
COMMAND_SET_D_REV       = 13    # Set motor 4 PWM rate in a reverse direction

For example the message: 6,25 will set motor 2 to move forwards with about 10% output.

Subscribe to Comments for "Support in Cayenne IOT framework"