sphere-leds

command module
v1.0.2-18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2015 License: MIT Imports: 6 Imported by: 0

README

sphere-leds

Listens for MQTT messages and toggles the leds on the sphere to various colors.

Usage

Messages

Set the PWM brightness to 100.

$ mosquitto_pub -m '{"brightness": 100}' -t '$hardware/status/reset'

Set the PWM brightness to 0.

$ mosquitto_pub -m '{"brightness": 0}' -t '$hardware/status/reset'

Change the "power" led to "blue".

$ mosquitto_pub -m '{"color": "blue", "flash": true}' -t '$hardware/status/power'

Valid led and color names are listed below:


var Colors = map[string][]int{
  "black":   {0, 0, 0},
  "red":     {1, 0, 0},
  "green":   {0, 1, 0},
  "blue":    {0, 0, 1},
  "cyan":    {0, 1, 1},
  "magenta": {1, 0, 1},
  "yellow":  {1, 1, 0},
  "white":   {1, 1, 1},
}

var LedNames = []string{
  "power",
  "wired_internet",
  "wireless",
  "pairing",
  "radio",
}

Licensing

sphere-leds is licensed under the MIT License. See LICENSE for the full license text.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL