Super basic and easy to use LED Matrix Module for the Framework 16.
go get github.com/DwifteJB/fw_ledmatrixmodule
package main
import (
"github.com/DwifteJB/fw_ledmatrixmodule"
)
func main() {
// NewLedMatrix supports PortToSelect of usually 1 or 2. 1 is usually left, 2 is usually right
// if this is empty, it'll auto select the first one found.
// It also supports PortName, so you can use ListPorts() and FindPort() to select the correct port type.
// the FindPort() and ListPorts() can be used to select which port you would like.
led, err := fw_ledmatrixmodule.NewLedMatrix(fw_ledmatrixmodule.LedMatrixConfig{})
if err != nil {
fmt.Println(err.Error())
}
err := led.SetBrightness(255)
// ...
}
SetBrightness(brightness int) // from 0 -> 255
ActivateBootloader() // activates the bootloader mode
WakeDisplay() // force wakes the display
SleepDisplay() // force sleeps the display
DrawMatrix(matrix Matrix) // draws a matrix of [9][34]bool
// ImageToMatrix
GetMatrixFromFile(fileName) (Matrix, error) // creates a matrix from a image file that is 34x9