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()

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.15.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

st_spin-0.0.15-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file st_spin-0.0.15.tar.gz.

File metadata

  • Download URL: st_spin-0.0.15.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for st_spin-0.0.15.tar.gz
Algorithm Hash digest
SHA256 8c3b4b7b6c78b8e0d4a785946b470738d726fc5a9b42e293352faa50c67d3aad
MD5 8f92fbca0b9fb0c2792a550b7537c89f
BLAKE2b-256 3d55070f822c6f01f6b5f767e6466dc41a1e1538f04a0e53a2ff153f57b0c515

See more details on using hashes here.

File details

Details for the file st_spin-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: st_spin-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for st_spin-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 724976144c27579a753b5f1b66703a5d152395a39d584e5f9cad1617167517fb
MD5 02c742dc50a7c2efbb1d286f46b878a0
BLAKE2b-256 95f4d614a46ea0cc23f742298de74572e217f164dca91d4a11af0b804fc475a7

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.22.4

2 files

0.0.22.2

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

This release

0.0.15 This release

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

1 file

0.0.9

1 file

0.0.8

1 file

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

2 files

0.0.0.7

2 files

0.0.0.6

2 files

0.0.0.5

2 files

0.0.0.4

2 files

0.0.0.3

2 files

0.0.0.2

2 files

0.0.0.1

2 files

0.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page