lights icon indicating copy to clipboard operation
lights copied to clipboard

Wirelessly control LEDs from Android

Lights

Design and source code for controlling a ring of LEDs via Bluetooth LE. More context for the project here.

Mirror

Eagle

The light ring PCB design is defined in an Eagle project ready for fabrication. It uses APA102 5050 RGB LEDs.

PCB

Arduino

The PCB (5V) is connected to an Adafruit Feather with BLE (3.3V) with a logic level converter. After board setup select Adafruit Feather 32u4 as the board and USBtinyISP as the programmer.

The Arduino code contains the pin definitions and has three library dependencies:

PCB

Android

The Android Studio project builds an apk with a background service maintaining the BLE connection.

Bind to the service from another app and send commands using the AIDL interface.

You can also use the debug UI or send intents to the debug service:

adb shell am startservice net.maxbraun.lights/.DebugService
adb shell am broadcast -a net.maxbraun.lights.ALL_WHITE