Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boombuler/led
golang package for some LED HID devices
https://github.com/boombuler/led
Last synced: 2 months ago
JSON representation
golang package for some LED HID devices
- Host: GitHub
- URL: https://github.com/boombuler/led
- Owner: boombuler
- License: mit
- Created: 2014-09-22T16:34:09.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-07-10T08:28:52.000Z (over 1 year ago)
- Last Synced: 2024-06-18T20:26:15.981Z (7 months ago)
- Language: Go
- Size: 12.7 KB
- Stars: 23
- Watchers: 6
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Package to control USB-LED devices
## Supported OS
* OSX
* Windows
* Linux## Supported devices
* [blink(1)](http://blink1.thingm.com/)
* [LinkM / BlinkM](http://thingm.com/products/linkm/)
* [BlinkStick](http://www.blinkstick.com/)
* [Blync](http://www.blynclight.com/)
* [Busylight UC](http://www.busylight.com/busylight-uc.html)
* [Busylight Lync](http://www.busylight.com/busylight-lync.html)
* DealExtreme USBMailNotifier
* [DreamCheeky USBMailNotifier](http://www.dreamcheeky.com/webmail-notifier)## References
Most of the device control knowledge is taken from the [NotifierLight](http://notifierlight.blogspot.de/) project.
## Documentation
See [GoDoc](https://godoc.org/github.com/boombuler/led)## Code example
```go
package mainimport (
"fmt"
"github.com/boombuler/led"
"image/color"
"time"
)var RED color.RGBA = color.RGBA{0xFF, 0x00, 0x00, 0xFF}
func main() {
for devInfo := range led.Devices() {
dev, err := devInfo.Open()
if err != nil {
fmt.Println(err)
continue
}
defer dev.Close()
dev.SetColor(RED)time.Sleep(2 * time.Second) // Wait 2 seconds because the device will turn off once it is closed!
}
}
```