pedrodbs / LEDLightStripControl

A Python script to control an LED light strip

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Python script to control this bluetooth LED light strip.

Tested with: Python 3.9 on Windows and Mac OS

Requirements:

Usage:

To discover the bluetooth address of the LED light strip, run:

python scanner.py

which will list the address and name of nearby devices.

To control the device, run:

python control.py  --address ADDRESS [--demo] [--interval INTERVAL]

where:

  • --address ADDRESS, -a ADDRESS: bluetooth mac address of light strip
  • --demo, -d: use in demo mode (cyclic rainbow)
  • --interval INTERVAL, -i INTERVAL: color update interval (secs)

If --demo is not set, the script will capture the dominant screen color of the machine in which the script is being invoked, and set that color to the light strip at the provided fixed time interval.

Method

I followed the instructions on this post to discover the BLE control characteristics of the light strip by using the official Android app and then checking the BLE communication logs via Wireshark.

About

A Python script to control an LED light strip

License:MIT License


Languages

Language:Python 100.0%