infrared

Package infrared provides an API to interface with the infrared module.

Usage

func Available

func Available() bool

Available returns whether driver is available or not.

func Close

func Close() (err error)

Close makes sure the infrared module driver is shut down.

func LightOff

func LightOff() (err error)

LightOff turns off the light.

func LightOn

func LightOn() (err error)

LightOn starts the emitting of infrared light without modulated information.

func SendInfraredSequence

func SendInfraredSequence(sequence []int) (err error)

SendInfraredSequence takes a slice of pulses and gaps in duration (microseconds)
and sends them to the infrared device. The length of the slice has to be an odd
number and start with, as well as end with a pulse duration.