https://github.com/johnmccabe/motephat
https://github.com/johnmccabe/motephat
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/johnmccabe/motephat
- Owner: johnmccabe
- License: mit
- Created: 2017-06-20T20:49:21.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-23T00:32:53.000Z (almost 9 years ago)
- Last Synced: 2025-01-25T04:13:03.216Z (over 1 year ago)
- Language: Go
- Size: 70.3 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Travis Badge]][Travis]
[![Go Report Card Badge]][Go Report Card]
[![GoDoc Badge]][GoDoc]

Buy the Mote PHAT & accessories here: https://shop.pimoroni.com/products/mote-phat
This repo contains a port of the [Pimoroni `mote-phat` library](https://github.com/pimoroni/mote-phat) from Python to Go, it also borrows heavily from @alexellis's [`blinkt_go` library](https://github.com/alexellis/blinkt_go). 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**

# 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:
```bash
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](http://reneefrench.blogspot.co.uk/) and is [Creative Commons Attributions 3.0](https://creativecommons.org/licenses/by/3.0/) licensed.*
[Travis]: https://travis-ci.org/johnmccabe/motephat
[Travis Badge]: https://travis-ci.org/johnmccabe/motephat.svg?branch=master
[Go Report Card]: https://goreportcard.com/report/github.com/johnmccabe/motephat
[Go Report Card Badge]: https://goreportcard.com/badge/github.com/johnmccabe/motephat
[GoDoc]: https://godoc.org/github.com/johnmccabe/motephat
[GoDoc Badge]: https://godoc.org/github.com/johnmccabe/motephat?status.svg