PyTic - Python interface for Pololu Tic Stepper Motor Controllers

Posted by Kevin on 7 August 2018

Customer Daniel Castelli of the Allen Institute has released a Python package for interfacing with our Tic Stepper Motor Controllers. Currently, he only supports 64-bit Windows, but the source code is available and should be straightforward to extend to other operating systems. Here is example code using PyTic to control a stepper motor:

import pytic
from time import sleep

# - Initialization -------------------------------------------

tic = pytic.PyTic()

# Connect to first available Tic Device serial number over USB
serial_nums = tic.list_connected_device_serial_numbers()

# Load configuration file and apply settings

# - Motion Command Sequence ----------------------------------

# Zero current motor position

# Energize Motor

# Move to listed positions
positions = [1000, 2000, 3000, 0]
for p in positions:
  while tic.variables.current_position != tic.variables.target_position:

# De-energize motor and get error status

The code and documentation for this package are available on GitHub.


Thank you for sharing my work on your blog. I hope the community finds PyTic useful.

The Tic Stepper Motor Controllers are great boards and I hope this opens up the potential to use them to a new audience on future robotics projects. I plan to add Windows 32-bit support and apply some other minor updates in the future.

Unfortunately, while this code is source-available, it is not open source as defined by the Open Source Initiative. The added clause in the project's license file states:

"3. Redistributions for commercial purposes are not permitted without the Allen Institute's written permission.
For purposes of this license, commercial purposes is the incorporation of the Allen Institute's software into
anything for which you will charge fees or other compensation. Contact for commercial
licensing opportunities."

which violates the first criteria of the open source definition.

See also:
Hello, anon.

We changed the blog post's wording to address your concerns.

Hi Jon,

Thank you, I appreciate it. I'm currently using Python to control my Tic board, possibly for commercial purposes later on. As such, I was disappointed to see that PyTic is proprietary. While my previous post may seem pedantic, these details are important.

For anyone else looking for an open source Python wrapper for the Tic stepper motor controllers, see pytic (lowercase) by Dan Tyrrell. It required some minor editing on my part to get working properly, but that took only a few minutes.

The blog is not an appropriate place for troubleshooting code-related issues; we would be happy to help you troubleshoot on our forum:

- Amanda

Post a comment

Using your Pololu account allows you to customize your avatar and manage your comments; you can also post anonymously.

Related Products

Tic T825 USB Multi-Interface Stepper Motor Controller (Connectors Soldered)
Tic T825 USB Multi-Interface Stepper Motor Controller
Tic T834 USB Multi-Interface Stepper Motor Controller (Connectors Soldered)
Tic T834 USB Multi-Interface Stepper Motor Controller
Tic T500 USB Multi-Interface Stepper Motor Controller (Connectors Soldered)
Tic T500 USB Multi-Interface Stepper Motor Controller
Tic T249 USB Multi-Interface Stepper Motor Controller (Connectors Soldered)
Tic T249 USB Multi-Interface Stepper Motor Controller

Related Categories

Tic Stepper Motor Controllers
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors