USB controller for my monitor LED strip.
- Warm/Cool/Brightness control
- Persistent storage in flash
- Timed protection from extended high power use
- Control via a USB HID device
- Mbed 6.x
- STM32F3
- Light and Gesture Sensor: APDS 9960
- LED warmth control based on time of day.
- Match LEDs to PC Sleep and Inactivity states.
- Tray Icon & Flyout
- WinUI 3 XAML UI
- Windows App SDK Packaged App
# Setup permissions
echo 'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", MODE="0660", TAG+="uaccess"'|sudo tee -a /etc/udev/rules.d/60-leds.rules
# Reload
sudo udevadm control --reload-rules && sudo udevadm trigger
# Turn on
hidapitester --vidpid 16C0/05DF --open \
-l 17 --send-output 0,1,0x90,0x12,0xE7,0x66,0x00,0x00,0x00,0x00,1,0,1,0xFF,0xFF,0xFF,0xFF \
-l 16 --read-input 0
# Get
hidapitester --vidpid 16C0/05DF --open \
-l 17 --send-output 0,0,0x90,0x12,0xE7,0x66,0x00,0x00,0x00,0x00,1,0,1,0xFF,0xFF,0xFF,0xFF \
-l 16 --read-input 0
# Notifications
hidapitester --vidpid 16C0/05DF --open \
-l 16 -t 10000 --read-input 0
# Set Light Sensor Range
hidapitester --vidpid 16C0/05DF --open \
-l 17 --send-output 0,2,0x00,0x80,0x00,0x40,0,0,0,0,0,0,0,0,0,0,0 \
-l 16 --read-input 0
podman build \
--tag leds-device-builder:latest \
device/docker
podman run \
--rm -it \
--name leds-device \
-v .:/src \
-v /run/media/$USER/NODE_F303RE/:/device \
--device /dev/ttyACM0 \
--group-add keep-groups \
leds-device-builder
- Jumpers in normal position:
- JP1 removed.
- ST-LINK both populated.
- JP5 populated in 2-3 (E5V).
- Connect main USB port & power supply.
- LD3 solid, LD1 blinking.
- Connect USB debug CN1.
- Device reset and LD1 solid.
Copy binary to USB storage device, use VS Code tasks.
Use VS Code tasks.
mbed-tools sterm -p /dev/ttyACM0