Tic Stepper Motor Controller library for Arduino
|
Version: 2.1.0
Release date: 2019-09-16
www.pololu.com
This is a library for the Arduino IDE that helps interface with a Tic Stepper Motor Controller (T500, T834, T825, T249, 36v4) using serial or I²C.
This library is designed to work with the Arduino IDE versions 1.8.x or later; we have not tested it with earlier versions. This library should support any Arduino-compatible board, including the Pololu A-Star controllers.
The Tic Stepper Motor Controllers can be purchased from Pololu's website. Before continuing, careful reading of the Tic Stepper Controller User's Guide is recommended.
To control the Tic using I2C, you should connect your board's SCL pin to the Tic's SCL pin, connect your board's SDA pin to the Tic's SDA pin, and connect one of your board's GND pins to one of the Tic's GND pins.
To control the Tic using asynchronous TTL serial, you need to at least connect your board's TX pin (as defined in the table below) to the Tic's RX pin, and connect your board's GND pin to one of the Tic's GND pins. If you want to read information from the Tic (as is done in this library's SerialPositionControl example), you must also connect your board's RX pin (as defined in the table below) to the Tic's TX pin.
The example sketches for this library use a hardware serial port on your Arduino if one is available: if your Arduino environment defines SERIAL_PORT_HARDWARE_OPEN
, the examples will use that port. The pins for this serial port are different depending on which Arduino you are using.
Microcontroller Board | Hardware serial? | MCU RX pin | MCU TX pin |
---|---|---|---|
A-Star 32U4 | Yes | 0 | 1 |
A-Star 328PB | Yes | 12 | 11 |
Arduino Leonardo | Yes | 0 | 1 |
Arduino Micro | Yes | 0 | 1 |
Arduino Mega 2560 | Yes | 19 | 18 |
Arduino Due | Yes | 19** | 18 |
Arduino Uno | No | 10 | 11 |
Arduino Yun | No | 10 | 11 |
** The Due's serial port is 3.3 V, so it should not be directly connected to the Tic's 5 V TX line. A voltage divider or level shifter can be used.
Before using the example sketches, you should use the Tic Control Center software to apply these settings:
You can use the Library Manager to install this library:
If this does not work, you can manually install the library:
Several example sketches are available that show how to use the library. You can access them from the Arduino IDE by opening the "File" menu, selecting "Examples", and then selecting "Tic". If you cannot find these examples, the library was probably installed incorrectly and you should retry the installation instructions above.
The main classes provided by the library are listed below:
For complete documentation of this library, see the tic-arduino documentation. If you are already on that page, then click the links in the "Classes" section above.
haltAndSetPosition
in the SerialSpeedControl
example because it is not necessary.