Skip to content

DwifteJB/fw_ledmatrixmodule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Framework Led Matrix Module

Super basic and easy to use LED Matrix Module for the Framework 16.

How to install

go get github.com/DwifteJB/fw_ledmatrixmodule

How to use

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)
	// ...
}

Supported Functions

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 

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages