epaper

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

epaper

epaper is an example of how to display an image to a Waveshare 2.7 inch epaper display hat with the Raspberry Pi 3 B+ written in Golang.

running the demo

Setup

Setup SPI by uncommenting dtparam=spi=on in /boot/config.txt. Then reboot sudo reboot.

Run

Run an epaper example with Golang

go run -mod=vendor ./examples/image

Run epaper with Docker

docker build . -t dmowcomber/epaper
docker run --rm -v /dev/mem:/dev/mem --device /dev/gpiomem --device /dev/spidev0.0 dmowcomber/epaper

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Epaper

type Epaper struct {
	// contains filtered or unexported fields
}

func New

func New(device *os.File, displayWidth, displayHeight int) *Epaper

func (*Epaper) WriteImage

func (e *Epaper) WriteImage(img *image.Gray)

func (*Epaper) WriteImageQuick

func (e *Epaper) WriteImageQuick(img *image.Gray, x, y int)

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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