Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotInitialized = errors.New("cannot send code: device is not initialized. make sure to initialize the device first") ErrCleanWOInitialized = errors.New("cannot cleanup a non-initialized device") ErrCleanup = errors.New("failed to cleanup: could not close rpio") ErrInitialize = errors.New("failed to initialize device: could not open rpio") ErrNonArm = errors.New("unsupported architecture: this library only works on the raspberry pi (arm)") )
Functions ¶
This section is empty.
Types ¶
type RFDevice ¶
type RFDevice struct { Pin rpio.Pin TxEnabled bool TxProto uint8 TxRepeat uint8 TxLength uint8 TxPulseLength uint16 }
func NewRF ¶
func NewRF(pinNumber uint8, protocolIndex uint8, repeat uint8, pulseLength uint16, length uint8) (RFDevice, error)
Initializes the GPIO device Provide a pin number, a protocol, how often the signal should be sent, the pulse length and the data length The pin number will be the `BCM / bcm2835` pin, not the physical one
Click to show internal directories.
Click to hide internal directories.