Flet GUI for the microscope-mounted NeoPixel WRGB ring. It finds a classic
Arduino on the serial port and sends the same commands as the MATLAB
ringLight_GUI.
- Python 3.10 or later
- Arduino running
ringLight.ino(/home/justin/jkcode/arduino/ringLight/ringLight.ino)
Close the Arduino Serial Monitor before launching — only one app may hold the serial port at a time.
115200 baud, LF-terminated lines:
W128,R64,G32,B0set ring color (White, Red, Green, Blue; each 0-255)OFFturn ring off
The Off button sends OFF and leaves the slider values unchanged. Closing
the window also sends OFF and releases the port.
Linux / macOS:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtWindows (PowerShell):
py -3 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txtpython ringLight3.pyOn Windows, close the Arduino IDE Serial Monitor before launching. The app looks for official Arduino and common clone USB serial chips (CH340, FTDI, CP210x).
flet build windows must be run on Windows. It cannot be cross-compiled from Linux.
- Install Python 3.10+ from python.org, and Visual Studio 2022 with the Desktop development with C++ workload (needed by Flutter).
- In this directory:
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
flet doctor
python ringLight3.py
flet build windowsThe executable is written to build\windows\x64\runner\Release\RingLight.exe.
A quicker PyInstaller bundle (larger, no Visual Studio) is:
flet pack main.py --name RingLightThat writes dist\RingLight.exe.