oled-rest

command module
v0.0.0-...-8f5e788 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2018 License: MIT Imports: 7 Imported by: 0

README

oled-rest — OLED controller with REST-API using Gobot

Build (for Raspberry Pi)

# GOARM=6 (Raspberry Pi A, A+, B, B+, Zero)
# GOARM=7 (Raspberry Pi 2, 3)
GOOS=linux GOARCH=arm GOARM=6 go build

Deploy

scp oled-rest root@$SSH_HOST:/root
ssh -t root@$SSH_HOST /root/oled-rest

API

Display an image

Use GET /show or POST /show with JSON data in message body containing an monochrome image to display the image. The JSON data is a two-dimensional array of booleans indicating each pixel's color (on/off).

type color bool // true: on, false: off
type row []color // one row consists of 128 colors
type image []row // one image consists of 64 rows
Set brightness

Use GET /brightness/%d where %d is an integer between [0-255] to set the brightness of the display.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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