radios

package
v0.0.0-...-3eac474 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Packet

type Packet struct {
	Data    []byte
	Freq    int
	FreqErr int
	Rssi    float64
}

Packet used by radios to store packets and associated information

func (Packet) String

func (p Packet) String() string

type RFM69

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

RFM69 Handles communication and state for the RFM69 wireless radio

func NewRFM69

func NewRFM69(port string, resetPin string, interruptPin string) (r RFM69, err error)

NewRFM69 sets up a new RFM69 class

func (*RFM69) DumpRegs

func (r *RFM69) DumpRegs() (err error)

DumpRegs dumps the current register settings in the RFM69

func (*RFM69) ReadFreqErr

func (r *RFM69) ReadFreqErr() (freqErr int, err error)

ReadFreqErr reads the current frequency correction

func (*RFM69) ReadRSSI

func (r *RFM69) ReadRSSI(manualStart bool) (rssiVal float64, err error)

ReadRSSI starts an RSSI reading

func (*RFM69) ReceiveData

func (r *RFM69) ReceiveData(timeout time.Duration) (pkt Packet, timedout bool, err error)

ReceiveData Waits for a payload to be ready in the

func (*RFM69) Reset

func (r *RFM69) Reset()

Reset resets the RFM69 module

func (*RFM69) SetFreq

func (r *RFM69) SetFreq(freq uint32) (err error)

SetFreq Sets the carrier freq of the RFM69

Jump to

Keyboard shortcuts

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