schedule

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlternatingSchedule

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

AlternatingSchedule moves the LED from beginning to the end then moves from end to beginning again (i.e. the Knight Rider pattern :-))

func (*AlternatingSchedule) Next

func (s *AlternatingSchedule) Next(count int) []bool

Next returns the next pattern

type BinarySchedule

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

BinarySchedule represents an increasing number as a set of bits

func (*BinarySchedule) Next

func (s *BinarySchedule) Next(count int) []bool

Next returns the next pattern

type LinearSchedule

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

LinearSchedule moves the active LED from first to last and then starts from the beginning again

func (*LinearSchedule) Next

func (ls *LinearSchedule) Next(count int) []bool

Next returns the next pattern

type RandomSchedule

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

RandomSchedule switches on a LED at random

func (*RandomSchedule) Next

func (s *RandomSchedule) Next(count int) []bool

Next returns the next pattern

type ReverseBinarySchedule

type ReverseBinarySchedule struct {
	BinarySchedule
}

ReverseBinarySchedule represents an increasing number as a set of bits, but in the reverse order as BinarySchedule

func (*ReverseBinarySchedule) Next

func (s *ReverseBinarySchedule) Next(count int) []bool

Next returns the next pattern

type Schedule

type Schedule interface {
	Next(count int) []bool
}

Schedule interface to determine the next LED to switch on

func New

func New(mode string) (Schedule, error)

New creates a new Schedule for the specified mode

Jump to

Keyboard shortcuts

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