Skip to content

grayson-arendt/sparkcan

Disclaimer

This project is not affiliated with, endorsed by, or in any way connected to REV Robotics. All product names, logos, and brands are property of their respective owners. Any references to REV Robotics products, such as the SPARK MAX or SPARK Flex, are purely for identification purposes and do not imply any endorsement or sponsorship.

Setup

A USB to CAN adapter such as a CANable is required. This package has been tested with the Spark MAX and SPARK Flex.

Make sure to use REV Hardware Client to set the device ID for your controllers and modify the values to match them in the examples. Ensure the correct motor type is set to either kBrushed or kBrushless depending on your motor, as it may damage the motor if set to the wrong type. This library will only work with firmware 24.0.X, it will not work with the new 25.0.X releases, therefore do not update the motor controller in REV Hardware Client.

Installation

sudo apt update
sudo apt upgrade
sudo apt install git cmake

sudo add-apt-repository ppa:graysonarendt/sparkcan
sudo apt update
sudo apt install sparkcan

git clone https://github.com/grayson-arendt/sparkcan-examples.git
cd sparkcan-examples/

chmod +x canable_start.sh
./canable_start.sh

mkdir build
cd build
cmake ..
make

Running an Example

./example_control # OR ./example_status OR ./example_pid

About

A Linux-based CAN bus interface for controlling REV Robotics' SPARK MAX and SPARK Flex motor controllers.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks