Skip to main content

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 (
	SpinChain,
	StCommand,
	StRegister,
	StConstant,
)

device_chain = SpinChain(
	total_devices=3,
	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)
motor_main.move(steps=2200)

while motor_main.isBusy():
	pass

motor_main.setDirection(StConstant.DirReverse)

motor_main.run(220)
time.sleep(3)
motor_main.stopSoft()

Release files for st-spin 0.0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for st-spin 0.0.0.3
File Size Uploaded
st_spin-0.0.0.3.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for st-spin 0.0.0.3
File Interpreter ABI Platform
st_spin-0.0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 22.1 kB

Release files / st_spin-0.0.0.3.tar.gz

Download URL st_spin-0.0.0.3.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f44579bf6cf9bc798ed4f2554527e7e673db7feff65fc9d154e2edcbc24d072b
BLAKE2b-256 checksum
How to use checksums
c8c40b925ecf3a14f632752ed5a551bd9a2f50861a30bb4e812d05ad85229825
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.2

Release files / st_spin-0.0.0.3-py3-none-any.whl

Download URL st_spin-0.0.0.3-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1e42df5affd588fe5fe48058c3a1a282bfd072d9de6c02a34c2b594fe54faf2
BLAKE2b-256 checksum
How to use checksums
c6180b0792ab238a46b2dd4c39adb8cb3c590a8f16f481479d3257818eaa6cb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.2

Release history Release notifications | RSS feed

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

2 release files

This release

0.0.0.3 This release

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page