Skip to content

Experimental bindings

Pre-release
Pre-release
Compare
Choose a tag to compare
@virtuald virtuald released this 09 Jan 08:15

Update: This release is obsolete, use the instructions in the documentation to install newer releases!

I don't have access to a Spark MAX controller, but I put together these hacky bindings to see if it was doable. Seems to work on a RoboRIO (simulation not implemented)! Here's the demo:

admin@roboRIO:~# python3
Python 3.7.2 (default, Dec 30 2018, 11:24:38) 
[GCC 6.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rev
>>> m = rev.CANSparkMax(3, rev.MotorType.kBrushless)
Unable to retrieve SPARK MAX firmware version                                        please verify the deviceID field matches the                                        configured CAN ID of the controller, and that                                        the controller is connected to the CAN Bus.
>>> m.set(4)
>>> m.get()
4.0

To install this on your roborio, you need to scp the whl to the roborio, then ssh in and do pip3 install filename.whl. Please try it out and let me know if it works!

Currently the only things implemented are:

  • get()
  • set(double)