oled

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2025 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDevice

func NewDevice(id string) (devices.Device[any], error)

Types

type Bit

type Bit bool

Bit is used to turn on or off a Bit on the ssd1306 OLED display

const (
	On  Bit = true
	Off Bit = false
)

type OLED

type OLED struct {
	Dev        *ssd1306.Dev
	Height     int
	Width      int
	Font       *basicfont.Face
	Background *image1bit.VerticalLSB

	*devices.DeviceBase[OLED]
	// contains filtered or unexported fields
}

func New

func New(name string, width, height int) (*OLED, error)

func (*OLED) AnimatedGIF

func (d *OLED) AnimatedGIF(fname string, done <-chan time.Time) error

func (*OLED) Clear

func (d *OLED) Clear()

func (*OLED) Clip

func (d *OLED) Clip(x0, y0, x1, y1 *int)

func (*OLED) Close

func (o *OLED) Close() error

func (*OLED) Diagonal

func (d *OLED) Diagonal(x0, y0, x1, y1 int, value Bit)

func (*OLED) Draw

func (d *OLED) Draw() error

func (*OLED) DrawString

func (d *OLED) DrawString(x, y int, str string)

func (*OLED) Get

func (d *OLED) Get() (any, error)

func (*OLED) Line

func (d *OLED) Line(x0, y0, len, width int, value Bit)

func (*OLED) Open

func (o *OLED) Open() error

func (*OLED) Rectangle

func (d *OLED) Rectangle(x0, y0, x1, y1 int, value Bit)

func (*OLED) Scroll

func (d *OLED) Scroll(o ssd1306.Orientation, rate ssd1306.FrameRate, startLine, endLine int) error

func (*OLED) Set

func (d *OLED) Set(v any) error

func (*OLED) SetBit

func (d *OLED) SetBit(x, y int, value Bit)

func (*OLED) StopScroll

func (d *OLED) StopScroll() error

Jump to

Keyboard shortcuts

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