Skip to content

Commit 2d2c6f5

Browse files
committed
docs: add write example
1 parent 6e97d10 commit 2d2c6f5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,17 @@ import (
3434
)
3535

3636
func main() {
37-
// Setup HID
38-
nuga.Init()
37+
// Setup HID
38+
nuga.Init()
3939
defer nuga.Exit()
4040
// Open connection with keyboard
4141
device, _ := nuga.Open()
4242
// Read current effects
4343
effects, _ := device.Features.Light.GetEffects()
4444
// Set brightness to 50%
4545
effects.Backlight.SetBrightness(2)
46+
// Write effects
47+
_ = device.Features.Light.SetEffects(effects)
4648
}
4749
```
4850

0 commit comments

Comments
 (0)