-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Hey folks,
I recently got a blinkstick and wanted to see how hard it would be to mess with it via golang. I found this library. I took the code from the readme and tried to give it a run and hit a quick crash (during build):
main.go:
package main
import (
"fmt"
"image/color"
"time"
"github.com/boombuler/led"
)
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!
}
}
c:\Users\csm10495\Desktop\blinkstick-status>go mod tidy
c:\Users\csm10495\Desktop\blinkstick-status>go run .
runtime/cgo: C:\Program Files\Go\pkg\tool\windows_amd64\cgo.exe: exit status 2
c:\Users\csm10495\Desktop\blinkstick-status>go version
go version go1.24.3 windows/amd64
Were there some other steps that I needed to take to get the sample up and running?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels