waveshare

package module
v0.0.0-...-e8779d6 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: GPL-3.0 Imports: 3 Imported by: 1

README

WaveShare

This repository is a functional library for 7.5" WaveShare ePaper displays.

It provides:

  • A way of displaying content on WaveShare ePaper displays
  • An example of how rPi GPIO/I2C can be used in go

Table of Contents:

About

I originally wrote this so I didn't have to use WaveShare's C lib in my thermostat project in an attempt to avoid using cgo.

This Repo was originally made around WaveShare's 7.5" eInk Display, but could be adapted to other resolution displays that use the same protocol. Feel free to take a look at the documentation I used:

Compiling from Source

If you're looking to compile from source, you'll need the following:

Contributing

Contributions are always welcome. If you're interested in contributing, send me an email or submit a PR.

The following things need work:

  • Partial updating needs to be added
  • Timings should be tightened up and unnecessary sleeping should be removed
  • The project should be written in a procedural way... the Go way!
  • Other, less important features need to be implemented

License

This project is currently licensed under GPLv3. This means you may use our source for your own project, so long as it remains open source and is licensed under GPLv3.

Please refer to the license file for more information.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayImage

func DisplayImage(dimg image.Image)

DisplayImage Loads and displays an image on an EPD

func Exit

func Exit()

Exit releases SPI/GPIO control

func Initialize

func Initialize()

Initialize Wakes up and initializes an EPD for use

func Reset

func Reset()

Reset Resets EPD (calling this will wake up the EPD)

func SendCommand

func SendCommand(b byte)

SendCommand Sends an arbitrary command to the display

func SendData

func SendData(b byte)

SendData Sends an arbitrary byte of data to the display

func SendImageData

func SendImageData(dimg image.Image, width int, height int)

SendImageData transmits the bits of an image

If trying to render an image to the screen, use DisplayImage or DisplayPartialImage instead

func Sleep

func Sleep()

Sleep turns off your EPD to prevent display damage

func TurnOnDisplay

func TurnOnDisplay()

TurnOnDisplay displays the image stored on our EPD

func WaitUntilIdle

func WaitUntilIdle()

WaitUntilIdle Loops until the initialized EPD is availible

Types

This section is empty.

Jump to

Keyboard shortcuts

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