Skip to main content

Python module for Spectral BLDC motor controllers

Project description

Spectral-BLDC

License: MIT Issues release

Python lib for controlling spectral BLDC controllers and SSG-48 gripper over CAN bus.

For more info about this API and all available commands check DOCS

How to install

pip install Spectral-BLDC

Basic example

import Spectral_BLDC as Spectral

import time





Communication1 = Spectral.CanCommunication(bustype='slcan', channel='COM41', bitrate=1000000)

Motor1 = Spectral.SpectralCAN(node_id=0, communication=Communication1)



while True:



    Motor1.Send_Respond_Encoder_data()



    message, UnpackedMessageID = Communication1.receive_can_messages(timeout=0.2)



    if message is not None:



        Motor1.UnpackData(message,UnpackedMessageID)

        print(f"Motor position is: {Motor1.position}")

        print(f"Motor speed is: {Motor1.speed}")



    else:

        print("No message after timeout period!")

    print("")

    time.sleep(1 )

More examples

Check out the Examples folder for more examples!

Available examples:

  • Send_respond_1

  • Get_encoder_data

  • SSG48_gripper_test

This project is entirely open-source and free for all to use. Any support, whether through donations or advice, is greatly appreciated. Thank you!

General badge

General badge

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

spectral_bldc-1.19.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

spectral_bldc-1.19-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file spectral_bldc-1.19.tar.gz.

File metadata

  • Download URL: spectral_bldc-1.19.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for spectral_bldc-1.19.tar.gz
Algorithm Hash digest
SHA256 366a99384a8b2008228579006ef0ad09de598e4e9ec890ba8dbb20dd3a14cf55
MD5 b31e61b039ea10b053828231bc27c498
BLAKE2b-256 ab3d055eb9f10e06f4b7b550ac98b0abddcfdfe380f9a49b25c756d3d7ebc514

See more details on using hashes here.

File details

Details for the file spectral_bldc-1.19-py3-none-any.whl.

File metadata

  • Download URL: spectral_bldc-1.19-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for spectral_bldc-1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 7f68d675be2049a434e5662d5ac82297499e2681b509df5affd7b298fa7dc45b
MD5 62333d6e132ac2b7f60acb205d26eb7a
BLAKE2b-256 062c8d5b1e9f0f8e264b8242170b06aec983fe7c5b54e162a95ad7b984e50df8

See more details on using hashes here.

Supported by

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