This Application Note covers using the BasicMicro Arduino library to control one or more encoders attached to a RoboClaw motor controller.
Using Encoders with the Python Library
Encoders are useful as part of a feedback system to maintain speed, position and track distance. RoboClaw does these things automatically however encoder attached to a roboClaw can be controlled and used with custom code using the BasicMicro Python library. This Application Notes covers how to use the available encoder functionality of the library.
Using the RoboClaw Python Library
Python is an easy to use programming language for both beginners and experienced programmers. The RoboClaw motor controller can be controlled via Python with the library provided by BasicMicro. Any platform that runs Python and has access to a serial port should work with the library.
Using the RoboClaw Arduino Library
The Arduino is an easy to use microcontroller for interfacing with the RoboClaw motor controller. It comes with a wide range of easy to use libraries out of the box. BasicMicro also has an easy to use library for the Arduino.
Packet Serial Bus Operation with the Raspberry Pi 3
Multiple RoboClaws can be used together for projects requiring more than one motor controller. This Application Note demonstrates the control of 4 RoboClaws by a Raspbery Pi using the packet serial control mode of the RoboClaw.
Standard Serial Bus with the Raspberry Pi 3
Multiple RoboClaw’s can be used simultaneously when controlled by a microcontroller or computer. The Raspberry Pi is one suitable choice. This Application Note covers using a Raspberry Pi 3 to control 4 RoboClaws in standard serial mode.
Standard Serial with the Raspberry Pi 3
This Application Note details how to operate the RoboClaw in standard serial mode using a Raspberry Pi 3. In standard serial mode the RoboClaw accepts single byte commands that control the operation of both motor channels.
Packet Serial with the Raspberry Pi 3
In this Application Note a Raspberry Pi is used to control a RoboClaw in packet serial mode. In packet serial mode the Raspberry Pi can send commands to the RoboClaw as well as read data from the it.
Configuring the Raspberry Pi 3 Serial Port
The Raspberry Pi is the most popular single board computer on the market and finds its way in to robotics projects the world over. The RoboClaw can easily be controlled from a Raspberry Pi but the serial port harware must be configured propely first. This App Note covers how to configure the serial sort before connecting it to a RoboClaw.
Standard Serial Mode with Arduino
The RoboClaw’s standard serial control mode is an easy method for control with just about any microcontroller. In this Application Note an Arduino will be used to control two motors in standard serial mode.