HandsON-BuildHat-API 1.0.4__tar.gz → 1.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {handson_buildhat_api-1.0.4/src/HandsON_BuildHat_API.egg-info → handson_buildhat_api-1.0.6}/PKG-INFO +8 -4
- {handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6}/README.md +6 -2
- {handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6}/pyproject.toml +2 -2
- {handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6}/src/HandsON_BuildHat_API/SpikePI.py +14 -12
- {handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6/src/HandsON_BuildHat_API.egg-info}/PKG-INFO +8 -4
- {handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6}/LICENSE +0 -0
- {handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6}/setup.cfg +0 -0
- {handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6}/src/HandsON_BuildHat_API/__init__.py +0 -0
- {handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6}/src/HandsON_BuildHat_API.egg-info/SOURCES.txt +0 -0
- {handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6}/src/HandsON_BuildHat_API.egg-info/dependency_links.txt +0 -0
- {handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6}/src/HandsON_BuildHat_API.egg-info/requires.txt +0 -0
- {handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6}/src/HandsON_BuildHat_API.egg-info/top_level.txt +0 -0
{handson_buildhat_api-1.0.4/src/HandsON_BuildHat_API.egg-info → handson_buildhat_api-1.0.6}/PKG-INFO
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: HandsON-BuildHat-API
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: A third-party API for controlling LEGO SPIKE devices
|
|
5
|
-
Author-email:
|
|
5
|
+
Author-email: HaNeul Jung <hnjung@handsontech.co.kr>
|
|
6
6
|
License: Proprietary - Personal/Educational Use Only
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
8
|
Classifier: License :: Other/Proprietary License
|
|
@@ -16,8 +16,12 @@ Dynamic: license-file
|
|
|
16
16
|
HandsON Build Hat API
|
|
17
17
|
=======
|
|
18
18
|
**Production** : HandsON Technology co., ltd.
|
|
19
|
-
**Author** : HaNeul Jung (
|
|
20
|
-
**Last Update** : 2025-
|
|
19
|
+
**Author** : HaNeul Jung (hnjung@handsontech.co.kr)
|
|
20
|
+
**Last Update** : 2025-08-29
|
|
21
|
+
|
|
22
|
+
## 주의
|
|
23
|
+
2025-08-27 이전 판매된 빌드햇 제품의 경우 1.0.4 버전을 사용
|
|
24
|
+
이후 판매된 모든 빌드햇은 1.0.5 이상의 버전을 사용하십시오.
|
|
21
25
|
|
|
22
26
|
## 개요
|
|
23
27
|
제작된 빌드햇의 제어에 필요한 API 라이브러리
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
HandsON Build Hat API
|
|
2
2
|
=======
|
|
3
3
|
**Production** : HandsON Technology co., ltd.
|
|
4
|
-
**Author** : HaNeul Jung (
|
|
5
|
-
**Last Update** : 2025-
|
|
4
|
+
**Author** : HaNeul Jung (hnjung@handsontech.co.kr)
|
|
5
|
+
**Last Update** : 2025-08-29
|
|
6
|
+
|
|
7
|
+
## 주의
|
|
8
|
+
2025-08-27 이전 판매된 빌드햇 제품의 경우 1.0.4 버전을 사용
|
|
9
|
+
이후 판매된 모든 빌드햇은 1.0.5 이상의 버전을 사용하십시오.
|
|
6
10
|
|
|
7
11
|
## 개요
|
|
8
12
|
제작된 빌드햇의 제어에 필요한 API 라이브러리
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
[project]
|
|
3
3
|
name = "HandsON-BuildHat-API"
|
|
4
|
-
version = "1.0.
|
|
4
|
+
version = "1.0.6"
|
|
5
5
|
description = "A third-party API for controlling LEGO SPIKE devices"
|
|
6
6
|
authors = [
|
|
7
|
-
{ name="
|
|
7
|
+
{ name="HaNeul Jung", email="hnjung@handsontech.co.kr" }
|
|
8
8
|
]
|
|
9
9
|
license = {text = "Proprietary - Personal/Educational Use Only"}
|
|
10
10
|
readme = "README.md"
|
{handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6}/src/HandsON_BuildHat_API/SpikePI.py
RENAMED
|
@@ -37,9 +37,11 @@ class _ConstValue:
|
|
|
37
37
|
|
|
38
38
|
ALL_PORT = 0b1111
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
MOTOR_STOP = 0
|
|
41
|
+
MOTOR_PWM = 1
|
|
42
|
+
MOTOR_ABS = 2
|
|
43
|
+
MOTOR_REL = 3
|
|
44
|
+
MOTOR_BRAKE = 255
|
|
43
45
|
|
|
44
46
|
class _PORT:
|
|
45
47
|
PORT = {
|
|
@@ -206,7 +208,7 @@ class Motor(_ModuleParent):
|
|
|
206
208
|
self._module_check(self._PORT, (_ConstModuleID.SMALL_MOTOR, _ConstModuleID.MEDIUM_MOTOR, _ConstModuleID.LARGE_MOTOR))
|
|
207
209
|
|
|
208
210
|
def stop(self) -> None:
|
|
209
|
-
com = bytes((_ConstValue.TRA_DATA + self._PORT, _ConstValue.
|
|
211
|
+
com = bytes((_ConstValue.TRA_DATA + self._PORT, _ConstValue.MOTOR_STOP, 0, 0))
|
|
210
212
|
self._send_data(com)
|
|
211
213
|
|
|
212
214
|
def start(self, speed:int) -> None:
|
|
@@ -216,7 +218,7 @@ class Motor(_ModuleParent):
|
|
|
216
218
|
if speed > 0: sw = 1
|
|
217
219
|
else: sw = 0
|
|
218
220
|
|
|
219
|
-
com = bytes((_ConstValue.TRA_DATA + self._PORT, _ConstValue.
|
|
221
|
+
com = bytes((_ConstValue.TRA_DATA + self._PORT, _ConstValue.MOTOR_PWM, abs(speed), sw))
|
|
220
222
|
self._send_data(com)
|
|
221
223
|
|
|
222
224
|
def run_to_position(self, degrees, speed) -> None:
|
|
@@ -228,7 +230,7 @@ class Motor(_ModuleParent):
|
|
|
228
230
|
if degrees >= 0: target = degrees
|
|
229
231
|
else: target = degrees & 0xFFFF
|
|
230
232
|
|
|
231
|
-
com = bytes((_ConstValue.TRA_DATA + self._PORT, _ConstValue.
|
|
233
|
+
com = bytes((_ConstValue.TRA_DATA + self._PORT, _ConstValue.MOTOR_ABS, speed, (target & 0xFF), (target >> 8)))
|
|
232
234
|
self._send_data(com)
|
|
233
235
|
|
|
234
236
|
def run_for_degrees(self, degrees, speed) -> None:
|
|
@@ -241,7 +243,7 @@ class Motor(_ModuleParent):
|
|
|
241
243
|
if degrees >= 0: target = degrees
|
|
242
244
|
else: target = degrees & 0xFFFFFFFF
|
|
243
245
|
|
|
244
|
-
com = bytes((_ConstValue.TRA_DATA + self._PORT, _ConstValue.
|
|
246
|
+
com = bytes((_ConstValue.TRA_DATA + self._PORT, _ConstValue.MOTOR_REL, speed, (target & 0xFF), (target >> 8) & 0xFF, (target >> 16) & 0xFF, (target >> 24) & 0xFF))
|
|
245
247
|
self._send_data(com)
|
|
246
248
|
|
|
247
249
|
def get_speed(self) -> int:
|
|
@@ -269,7 +271,7 @@ class MotorPair(_ModuleParent):
|
|
|
269
271
|
|
|
270
272
|
def stop(self) -> None:
|
|
271
273
|
for i in self._PORTs:
|
|
272
|
-
com = bytes((_ConstValue.TRA_DATA + i, _ConstValue.
|
|
274
|
+
com = bytes((_ConstValue.TRA_DATA + i, _ConstValue.MOTOR_PWM, 0, 0))
|
|
273
275
|
self._send_data(com)
|
|
274
276
|
|
|
275
277
|
def start(self, steering, speed) -> None:
|
|
@@ -287,7 +289,7 @@ class MotorPair(_ModuleParent):
|
|
|
287
289
|
if speed > 0: sw = 1
|
|
288
290
|
else: sw = 0
|
|
289
291
|
|
|
290
|
-
com = bytes((_ConstValue.TRA_DATA + motor, _ConstValue.
|
|
292
|
+
com = bytes((_ConstValue.TRA_DATA + motor, _ConstValue.MOTOR_PWM, abs(speed), sw))
|
|
291
293
|
self._send_data(com)
|
|
292
294
|
|
|
293
295
|
def move(self, degrees, steering, speed) -> None:
|
|
@@ -310,7 +312,7 @@ class MotorPair(_ModuleParent):
|
|
|
310
312
|
|
|
311
313
|
if count == 1: target = ~target
|
|
312
314
|
|
|
313
|
-
com = bytes((_ConstValue.TRA_DATA + motor, _ConstValue.
|
|
315
|
+
com = bytes((_ConstValue.TRA_DATA + motor, _ConstValue.MOTOR_REL, speed, (target & 0xFF), (target >> 8) & 0xFF, (target >> 16) & 0xFF, (target >> 24) & 0xFF))
|
|
314
316
|
self._send_data(com)
|
|
315
317
|
|
|
316
318
|
|
|
@@ -332,7 +334,7 @@ class MotorPair(_ModuleParent):
|
|
|
332
334
|
|
|
333
335
|
if count == 1: target = ~target
|
|
334
336
|
|
|
335
|
-
com = bytes((_ConstValue.TRA_DATA + motor, _ConstValue.
|
|
337
|
+
com = bytes((_ConstValue.TRA_DATA + motor, _ConstValue.MOTOR_REL, speed, (target & 0xFF), (target >> 8) & 0xFF, (target >> 16) & 0xFF, (target >> 24) & 0xFF))
|
|
336
338
|
self._send_data(com)
|
|
337
339
|
|
|
338
340
|
def start_tank(self, left_speed, right_speed) -> None:
|
|
@@ -348,5 +350,5 @@ class MotorPair(_ModuleParent):
|
|
|
348
350
|
if speed > 0: sw = 1
|
|
349
351
|
else: sw = 0
|
|
350
352
|
|
|
351
|
-
com = bytes((_ConstValue.TRA_DATA + motor, _ConstValue.
|
|
353
|
+
com = bytes((_ConstValue.TRA_DATA + motor, _ConstValue.MOTOR_PWM, abs(speed), sw))
|
|
352
354
|
self._send_data(com)
|
{handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6/src/HandsON_BuildHat_API.egg-info}/PKG-INFO
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: HandsON-BuildHat-API
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: A third-party API for controlling LEGO SPIKE devices
|
|
5
|
-
Author-email:
|
|
5
|
+
Author-email: HaNeul Jung <hnjung@handsontech.co.kr>
|
|
6
6
|
License: Proprietary - Personal/Educational Use Only
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
8
|
Classifier: License :: Other/Proprietary License
|
|
@@ -16,8 +16,12 @@ Dynamic: license-file
|
|
|
16
16
|
HandsON Build Hat API
|
|
17
17
|
=======
|
|
18
18
|
**Production** : HandsON Technology co., ltd.
|
|
19
|
-
**Author** : HaNeul Jung (
|
|
20
|
-
**Last Update** : 2025-
|
|
19
|
+
**Author** : HaNeul Jung (hnjung@handsontech.co.kr)
|
|
20
|
+
**Last Update** : 2025-08-29
|
|
21
|
+
|
|
22
|
+
## 주의
|
|
23
|
+
2025-08-27 이전 판매된 빌드햇 제품의 경우 1.0.4 버전을 사용
|
|
24
|
+
이후 판매된 모든 빌드햇은 1.0.5 이상의 버전을 사용하십시오.
|
|
21
25
|
|
|
22
26
|
## 개요
|
|
23
27
|
제작된 빌드햇의 제어에 필요한 API 라이브러리
|
|
File without changes
|
|
File without changes
|
{handson_buildhat_api-1.0.4 → handson_buildhat_api-1.0.6}/src/HandsON_BuildHat_API/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|