hub75

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: BSD-3-Clause Imports: 4 Imported by: 17

Documentation

Overview

Package hub75 implements a driver for the HUB75 LED matrix.

Guide: https://cdn-learn.adafruit.com/downloads/pdf/32x16-32x32-rgb-led-matrix.pdf This driver was inspired by https://github.com/2dom/PxMatrix

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Width      int16
	Height     int16
	ColorDepth uint16
	RowPattern int16
	Brightness uint8
	FastUpdate bool
}

type Device

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

func New

func New(b drivers.SPI, latPin, oePin, aPin, bPin, cPin, dPin machine.Pin) Device

New returns a new HUB75 driver. Pass in a fully configured SPI bus.

func (*Device) ClearDisplay

func (d *Device) ClearDisplay()

ClearDisplay erases the internal buffer

func (*Device) Configure

func (d *Device) Configure(cfg Config)

Configure sets up the device.

func (*Device) Display

func (d *Device) Display() error

Display sends the buffer (if any) to the screen.

func (*Device) FlushDisplay

func (d *Device) FlushDisplay()

FlushDisplay flushes the display

func (*Device) SetBrightness

func (d *Device) SetBrightness(brightness uint8)

SetBrightness changes the brightness of the display

func (*Device) SetPixel

func (d *Device) SetPixel(x int16, y int16, c color.RGBA)

SetPixel modifies the internal buffer in a single pixel.

func (*Device) Size

func (d *Device) Size() (w, h int16)

Size returns the current size of the display.

Jump to

Keyboard shortcuts

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