Skip to content

Arduino bindings for the moteus motor brushless motor controller

License

Notifications You must be signed in to change notification settings

mjbots/moteus-arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moteus library for Arduino

Summary

This is a C++ library that provides a convenient API for controlling and monitoring an mjbots moteus brushless servo controller. It uses the ACAN2517FD library to perform CAN-FD communications, but could be easily modified to work with other libraries.

Getting started

Note that this library can only communicate and operate a moteus controller which has already been calibrated. Calibration currently can not be performed via an Arduino and requires moteus_tool executing on a desktop computer with some CAN-FD adapter. See the moteus getting started guide for details. The only controllers sold by mjbots.com which are pre-calibrated are those included in development kits.

Hardware

You will need to have hardware that is compatible with the ACAN2517FD library, this will be something that has the MCP2517FD or MCP2518FD CAN-FD controller onboard.

The CAN-FD bus needs to be connected to moteus, typically this would be at least the CANL and CANH wires, and likely the ground as well. For more than 2 or 3 controllers, separate 120 ohm termination resistors will be required on each end of the CAN bus. Some Arduino CAN-FD shields, like the CANBed FD, have one termination resistor built in.

Software

If you are using version 1.6.x or later of the Arduino software (IDE) you can use the Library Manager to install this library:

  1. In the Arduino IDE, open the "Sketch" menu, select "Include Library", then "Manage Libraries...".
  2. Search for "moteus"
  3. Click the moteus entry in the list.
  4. Click "Install".

If this does not work, you can manually install the library:

  1. Download the latest release archive from GitHub and decompress it
  2. Rename the folder "moteus-arduino" to "moteus"
  3. Drag the "moteus" folder into the "libraries" directory inside your Arduino sketchbook directory. You can view your sketchbook location by opening the "File" menu and selecting "Preferences" in the Arduino IDE. If there is not already a "libraries" folder in that location, you should make the folder yourself.
  4. After installing the library, restart the Arduino IDE.

Examples

Several examples are available. You can access them from the Arduino IDE by opening the "File" menu, selecting "Examples", and then selecting "moteus".

Documentation

For complete documentation, see [docs/reference.md](the reference documentation).

About

Arduino bindings for the moteus motor brushless motor controller

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages