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 git+https://github.com/ElectroBlocks/python.git

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()

License

MIT

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: electroblocks-0.1.0.tar.gz
  • Upload date:
  • Size: 14.9 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.0.tar.gz
Algorithm Hash digest
SHA256 4d82378203fe0cd63913932078a881040e3c2eb223bb0af35a9f6bf568642420
MD5 2d86a837f9caed992ea63391481f5bbb
BLAKE2b-256 04a9b06fa0698efe77307754abbd79109dd2927a7812c2fbf7386698d7b9a5d3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: electroblocks-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 609a530199ae72bc7884a0df2bc01c92d87c3c5d9a61114e058d89c92594e420
MD5 feb781e4f656ebd940c7ea95e2a11f00
BLAKE2b-256 9ead2b8d87d211e67fd97743612c0a3f32c992b23a335ef9e2f2460d51588e29

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