Skip to main content

Interface for ST SpinFamily motor drivers

Project description

ST Spin Family Interface

A Python library for interfacing with ST Spin Family devices, specifically the ST Micro L6470, L6472, L6474, and L6480 ICs.

Currently this project has a single dependency: spidev.

Getting Started

Add stspin to your list of requirements and install.

Create a device chain

import time  # Used in our example

from stspin import (

device_chain = SpinChain(
	spi_select=(0, 0)

This assumes the spi device is at 0, 0.

Create devices

motor_main = device_chain.create_device(0)
motor_secondary = device_chain.create_device(1)

In our example, there are three devices in the chain, and device 0 is furthest along the chain from the controlling IC's MOSI pin.

Run basic commands

motor_main.hiZHard()  # It is good practice to set device into HiZ-State before setting parameters
motor_main.setRegister(StRegister.SpeedMax, 0x022)

while motor_main.isBusy():


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

st_spin-0.0.13.tar.gz (7.0 kB view hashes)

Uploaded source

Built Distribution

st_spin-0.0.13-py3-none-any.whl (9.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page