Buy the Mote controller & accessories here: https://shop.pimoroni.com/products/mote
This repo contains a port of the Pimoroni Mote library from Python to Go. It has been verified to work on OSX Sierra and Raspberry Pi 3 (Raspbian). Do let me know if you run on a different platform.
If you have a PHAT Mote go here: https://github.com/johnmccabe/mote-phat
You should have Go version 1.8+ installed and your GOPATH configured.
You will need to have gcc available on your PATH in order to build with the library due to the go-serial-native libraries use of cgo.
Install gcc using the apt package manager.
sudo apt update
sudo apt install gcc
Install gcc via the XCode Command Line tools.
xcode-select --install
Install the mote library with go get, like so:
go get -u github.com/johnmccabe/moteYou can of course use your own choice of depedency management tool, Glide, Godep etc.
You can run the supplied example programs (ported from their Python equivalents) as follows (installing glide first which is used to pull down the examples dependencies).
go get github.com/Masterminds/glide
cd $GOPATH/src/github.com/johnmccabe/mote
glide install
Then running each example as follows.
go run examples/rgb/rgb.go 255 0 0
go run examples/rainbow/rainbow.go
go run examples/cheerlights/cheerlights.go
The Golang Gopher was created by Renée French and is Creative Commons Attributions 3.0 licensed.