Python module for Spectral BLDC motor controllers
Project description
Spectral-BLDC
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!
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
366a99384a8b2008228579006ef0ad09de598e4e9ec890ba8dbb20dd3a14cf55
|
|
| MD5 |
b31e61b039ea10b053828231bc27c498
|
|
| BLAKE2b-256 |
ab3d055eb9f10e06f4b7b550ac98b0abddcfdfe380f9a49b25c756d3d7ebc514
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f68d675be2049a434e5662d5ac82297499e2681b509df5affd7b298fa7dc45b
|
|
| MD5 |
62333d6e132ac2b7f60acb205d26eb7a
|
|
| BLAKE2b-256 |
062c8d5b1e9f0f8e264b8242170b06aec983fe7c5b54e162a95ad7b984e50df8
|