Files
led-bar/tool/README.md

1.5 KiB

LED Bar Configuration Tool

A tkinter GUI tool for configuring LED bar settings via mpremote.

Features

  • Download settings.json from MicroPython device using mpremote
  • Edit LED configuration settings
  • Upload modified settings.json back to device
  • Load/save settings from/to local files

Requirements

  • Python 3.x with tkinter (usually included)
  • mpremote: pip install mpremote

Usage

python3 tool/led_config.py

Or make it executable:

chmod +x tool/led_config.py
./tool/led_config.py

Configuration Fields

  • LED Pin: GPIO pin number for LED strip
  • Number of LEDs: Total number of LEDs in the strip
  • Color Order: RGB or RBG color order
  • Device Name: Name identifier for the device
  • Pattern: Current LED pattern
  • Color 1/Color 2: Primary colors (hex format, e.g., #ff0000)
  • Delay: Pattern delay in milliseconds
  • Brightness: LED brightness level
  • N1-N6: Pattern-specific parameters
  • AP Password: WiFi access point password
  • ID: Device ID

Device Connection

Default device is /dev/ttyUSB0. Change it in the "Device" field if your device is on a different port (e.g., /dev/ttyACM0, COM3 on Windows).

Workflow

  1. Enter your device path (e.g., /dev/ttyUSB0)
  2. Click "Download Settings" to fetch current settings from device
  3. Edit any settings as needed
  4. Click "Upload Settings" to save changes back to device

You can also:

  • Load settings from a local JSON file
  • Save current settings to a local JSON file