Releases: ScaredyCat/USBNotify
Savable settings
This release adds the ability to save settings which are applied at boot.
Save settings
You can save the colour, effect and brightness to the device so that it will start up with those options.
./example.sh <DEVICE-SERIAL-NUMBER> <COLOUR> <EFFECT> <BRIGHTNESS> --save
eg
./example.sh DE64A876CF551522 red pulse 10 --save
If you save your settings you should see the LED flash white 4 times and then return to your saved settings. On boot if you have no saved settings the LED with flash blue once, then red. If you have saved settings the LED will flash blue once and then green twice before applying those settings.
Version 1.0
Insert the device while holding the boot button, it will present as a usb drive. Copy the uf2 file to it and it will automatically disconnect and restart as a usb hid device. You'll need to be root or use sudo to control the device unless you do the following:
Copy udev rule file and reload
cp support/99-hid-led.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
Remove and plug in your device again, you should no longer need to sudo to control it.
Example script for control in support directory also linux udev rule.
There are named colours in the example script ( red, green, blue, yellow, magenta, cyan,white, orange, purple,amber, indigo, off )
List all the devices on a machine:
./example.sh list
Scanning for Waveshare RP2040-One devices...
Node | Serial Number
/dev/hidraw4 | DE64A876CF551522
Control the LED with
./example.sh <DEVICE-SERIAL-NUMBER> <COLOUR> <EFFECT> <BRIGHTNESS>
eg
./example.sh DE64A876CF551522 red pulse 10
Valid effects are solid, pulse, flash, blip, rainbow.
The colour off just sets the RGB values to 0,0,0