Documentation
¶
Overview ¶
Package sensors implements code to read various sensors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TOF10120 ¶
type TOF10120 struct {
// contains filtered or unexported fields
}
TOF10120 is a driver for a TOF10120 sensor
func NewTOF10120 ¶
func NewTOF10120(port io.ReadWriter) *TOF10120
NewTOF10120 creates a instance to initialize and read the TOF sensor port must return an entire packet for each Read(). github.com/simpleiot/simpleiot/respreader is a good way to do this.
func (*TOF10120) Read ¶
Read returns the distance in mm. The sensor continuously ouputs readings so the callback is called each time a new reading is read.
func (*TOF10120) SetSendInterval ¶
SetSendInterval sets the interval at which sensor sends data 10-9999ms, default 100ms this should be called before Read() is started
Click to show internal directories.
Click to hide internal directories.