PyTic - Python interface for Pololu Tic Stepper Motor Controllers

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()
tic.connect_to_serial_number(serial_nums[0])

# Load configuration file and apply settings
tic.settings.load_config('path\\to\\config.yml')
tic.settings.apply()                             

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

# Zero current motor position
tic.halt_and_set_position(0)

# Energize Motor
tic.energize()
tic.exit_safe_start()

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

# De-energize motor and get error status
tic.enter_safe_start()
tic.deenergize()
print(tic.variables.error_status)

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

SC/APC Fiber Optic Fast Connector

Sc/Apc Fiber Optic Fast Connector,Fiber Optic Adaptor Fast Connector,Fiber Quick Connect Kit,Sc Fiber Optic Fast Connector

Ningbo Fengwei Communication Technology Co., Ltd , https://www.fengweicommunication.com