Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

electroblocks-0.1.23.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

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

electroblocks-0.1.23-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file electroblocks-0.1.23.tar.gz.

File metadata

  • Download URL: electroblocks-0.1.23.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for electroblocks-0.1.23.tar.gz
Algorithm Hash digest
SHA256 32191d24fcc9d8c0a6fdfa0f1b70365c3b3c4e2b48b689709c0657bdbc6b4497
MD5 d84880ab8ff66e91d39c385646903b80
BLAKE2b-256 21d880186cea89cc0117299b103a1b7c15d5a4b03c951fcf85303de320a8cda1

See more details on using hashes here.

File details

Details for the file electroblocks-0.1.23-py3-none-any.whl.

File metadata

  • Download URL: electroblocks-0.1.23-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.14

File hashes

Hashes for electroblocks-0.1.23-py3-none-any.whl
Algorithm Hash digest
SHA256 a8a87e38a889ea4d0957fd326f5a5c3dd868e5de6a8a0d7bfa262b931cb1a44c
MD5 b2dfedb66bbe0c6b2908fc97d7a68260
BLAKE2b-256 46dc70aa260ecf488206a631d0c3d1fa24d00e30ba3efc93c64641d5014a3f1d

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