Skip to content

johnmccabe/motephat

Repository files navigation

Travis Badge Go Report Card Badge GoDoc Badge

Mote Buy the Mote PHAT & accessories here: https://shop.pimoroni.com/products/mote-phat

This repo contains a port of the Pimoroni mote-phat library from Python to Go, it also borrows heavily from @alexellis's blinkt_go library. It has been verified to work on Raspberry Pi 3 (Raspbian). Do let me know if you run on a different platform.

If you have a non-PHAT Mote go here: https://github.com/johnmccabe/mote

WARNING THIS IS WORK IN PROGRESS, ISSUES/PULL REQUESTS STILL WELCOME THOUGH WIP

Prerequisites

You should have Go version 1.8+ installed and your GOPATH configured.

You will need to have the wiringpi package installed.

sudo apt-get install -qy wiringpi

Installation

Install the mote library with go get, like so:

go get -u github.com/johnmccabe/motephat

You can of course use your own choice of depedency management tool, Glide, Dep etc.

Examples

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

The Golang Gopher was created by Renée French and is Creative Commons Attributions 3.0 licensed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published