Skip to content

adnanbrq/nanoleaf-go

Repository files navigation

Nanoleaf Go API

Nanoleaf API made in Go (GoLang)

Contents

Installation

$ go get github.com/adnanbrq/nanoleaf

Usage

package main

import (
  "github.com/adnanbrq/nanoleaf"
  "os"
)

func main() {
  url := os.Getenv("nanoleaf_url")
  nano := nanoleaf.NewNanoleaf(url)

  if err := nano.Identity.Flash(); err != nil {
		panic(err)
  }
  
  if err := nano.Effects.Set("Flames"); err != nil {
    panic(err)
  }
}

Dependencies