Skip to content

Commit d9f4c05

Browse files
committed
update
1 parent f9c2949 commit d9f4c05

5 files changed

Lines changed: 59 additions & 9 deletions

File tree

Spectral_BLDC.egg-info/PKG-INFO

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Metadata-Version: 2.1
2-
Name: Spectral-BLDC
3-
Version: 1.18
1+
Metadata-Version: 2.4
2+
Name: Spectral_BLDC
3+
Version: 1.19
44
Summary: Python module for Spectral BLDC motor controllers
55
Author: Source robotics (Petar Crnjak)
66
Author-email: <info@source-robotics.com>
@@ -16,20 +16,70 @@ Classifier: Operating System :: Unix
1616
Classifier: Operating System :: Microsoft :: Windows
1717
Description-Content-Type: text/markdown
1818
License-File: LICENSE
19+
Requires-Dist: python-can
20+
Requires-Dist: pyserial
21+
Dynamic: author
22+
Dynamic: author-email
23+
Dynamic: classifier
24+
Dynamic: description
25+
Dynamic: description-content-type
26+
Dynamic: keywords
27+
Dynamic: license
28+
Dynamic: license-file
29+
Dynamic: project-url
30+
Dynamic: requires-dist
31+
Dynamic: summary
1932

2033

2134
# Spectral-BLDC
2235

23-
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
36+
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) ![Issues](https://img.shields.io/github/issues/PCrnjak/Spectral-BLDC-Python) ![release](https://img.shields.io/github/v/release/PCrnjak/Spectral-BLDC-Python)
2437

25-
26-
Python lib for controlling spectral BLDC controllers over CAN bus.
38+
Python lib for controlling [spectral BLDC](https://github.com/PCrnjak/Spectral-Micro-BLDC-controller/blob/main/README.md) controllers and [SSG-48 gripper](https://github.com/PCrnjak/SSG-48-adaptive-electric-gripper) over CAN bus.
39+
For more info about this API and all available commands check [DOCS](https://source-robotics.github.io/Spectral-BLDC-docs/apage7_can/)
2740

2841
# How to install
2942

30-
# How to use
43+
pip install Spectral-BLDC
44+
45+
# Basic example
46+
47+
48+
``` py
49+
import Spectral_BLDC as Spectral
50+
import time
51+
52+
53+
Communication1 = Spectral.CanCommunication(bustype='slcan', channel='COM41', bitrate=1000000)
54+
Motor1 = Spectral.SpectralCAN(node_id=0, communication=Communication1)
55+
56+
while True:
57+
58+
Motor1.Send_Respond_Encoder_data()
59+
60+
message, UnpackedMessageID = Communication1.receive_can_messages(timeout=0.2)
61+
62+
if message is not None:
63+
64+
Motor1.UnpackData(message,UnpackedMessageID)
65+
print(f"Motor position is: {Motor1.position}")
66+
print(f"Motor speed is: {Motor1.speed}")
67+
68+
else:
69+
print("No message after timeout period!")
70+
print("")
71+
time.sleep(1 )
72+
```
73+
74+
75+
# More examples
76+
77+
Check out the [Examples folder](https://github.com/PCrnjak/Spectral-BLDC-Python/tree/main/examples) for more examples!
78+
Available examples:
79+
* Send_respond_1
80+
* Get_encoder_data
81+
* SSG48_gripper_test
3182

32-
# Examples
3383

3484

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

dist/Spectral_BLDC-1.18.tar.gz

-8.09 KB
Binary file not shown.
8.78 KB
Binary file not shown.

dist/spectral_bldc-1.19.tar.gz

9.53 KB
Binary file not shown.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
88
long_description = "\n" + fh.read()
99

10-
VERSION = '1.18'
10+
VERSION = '1.19'
1111
DESCRIPTION = 'Python module for Spectral BLDC motor controllers'
1212

1313
# Setting up

0 commit comments

Comments
 (0)