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.

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.7.tar.gz (15.2 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.7-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: electroblocks-0.1.7.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for electroblocks-0.1.7.tar.gz
Algorithm Hash digest
SHA256 b009f759998869bb62a2ad487b33c8988d8a82db1be73348a3458c826fbad12f
MD5 93f0daada95691d2e2d36cbcc8262ec1
BLAKE2b-256 5231668b86e1268c6ee1646921377c7b9bd93da07ef5d24d6dfb22d498b80356

See more details on using hashes here.

File details

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

File metadata

  • Download URL: electroblocks-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for electroblocks-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f04cbb471bcffde491ba1d3a6243b97f2f7ce8c41be81567e57b7c3aee1c034e
MD5 44ece23d04da2023d5c9605bf463280b
BLAKE2b-256 bdda86384568b5e11ab53b2a0d4466a5ad989c0b68e37fff60eb4b36e2a8b7e5

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