Python client library to interact with ElectroBlocks Arduino firmware
Project description
ElectroBlocks
ElectroBlocks is a Python library for communicating with Arduino-based educational hardware using a custom serial protocol. It simplifies control of servos, RGB LEDs, LCD screens, and more—especially in block-based coding environments like Blockly.
Upgrade To New Version
- Go to this file pyproject.toml
- Change the version number by .1
version = "0.1.8" - Push to main
Features
- Auto-detects the first available Arduino Uno or Mega over USB
- Sends
config:and control commands to the Arduino firmware - Waits for
"System:READY"and"DONE_NEXT_COMMAND"to sync logic - Supports digital write, RGB LEDs, LCD printing, and servo control
Installation
pip install electroblocks
Example
from electroblocks import ElectroBlocks
eb = ElectroBlocks()
eb.config_servo(5)
eb.move_servo(5, 90)
eb.config_rgb(3, 5, 6)
eb.set_rgb(255, 128, 0)
eb.config_lcd()
eb.lcd_print(0, 0, "Hello")
eb.lcd_clear()
eb.digital_write(13, 1)
eb.close()
Project details
Release history Release notifications | RSS feed
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 electroblocks-0.1.25.tar.gz.
File metadata
- Download URL: electroblocks-0.1.25.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
907f01f650890e22ec920ddca0a74851d461f2d81577754b15b4c3ab5bb27f0a
|
|
| MD5 |
50cbe3ea731ff6e576cff32c4c9dfe4c
|
|
| BLAKE2b-256 |
a4516391b82b066ba4d26d05c50d0f3b78e4cbb5c698232bac7a2960ee5e2bf6
|
File details
Details for the file electroblocks-0.1.25-py3-none-any.whl.
File metadata
- Download URL: electroblocks-0.1.25-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a46cc843a53fc949c4a5e9be69cbaa5b412eee006153d71dd0601e0af897a41f
|
|
| MD5 |
9156f1c8a2f8a9a3ab3ef2e21ab8eecc
|
|
| BLAKE2b-256 |
06e0e1922fe3d499811ab1e791e2a38f3663e5bf76d70fc3f0d939143cea8e74
|