Documentation ¶
Index ¶
- type Dev
- func (d *Dev) CheckError() error
- func (d *Dev) Halt() error
- func (d *Dev) Precision(e *physic.Env)
- func (d *Dev) Sense(e *physic.Env) error
- func (d *Dev) SenseContinuous(interval time.Duration) (<-chan physic.Env, error)
- func (d *Dev) SetThreshold(lower, upper uint16) error
- func (d *Dev) String() string
- type Opts
- type RTDType
- type WireCount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dev ¶
type Dev struct {
// contains filtered or unexported fields
}
func (*Dev) CheckError ¶ added in v0.3.0
func (*Dev) Halt ¶
Halt stops the MAX31865 from acquiring measurements as initiated by SenseContinuous().
It is recommended to call this function before terminating the process to reduce idle power usage and a goroutine leak.
func (*Dev) Precision ¶
15-Bit ADC Resolution; Nominal temperature resolution varies due to RTD non-linearity
func (*Dev) SenseContinuous ¶
SenseContinuous returns measurements as °C on a continuous basis.
The application must call Halt() to stop the sensing when done to stop the sensor and close the channel.
It's the responsibility of the caller to retrieve the values from the channel as fast as possible, otherwise the interval may not be respected.
func (*Dev) SetThreshold ¶ added in v0.3.1
type Opts ¶
type Opts struct { // ContinuousMode removes delays by leaving the bias voltage enabled between // readings. This slightly increases power consumption and self-heating, but // is useful when taking measurements as quickly as possible (< 55/66ms) ContinuousMode bool // 60Hz noise is filtered by default, enable to filter 50Hz noise instead. Filter50Hz bool Port string RefResistor float64 RTDType RTDType WireCount WireCount }
Opts holds various configuration options for the sensor
func AdafruitPT100 ¶
func AdafruitPT100() *Opts
func AdafruitPT1000 ¶
func AdafruitPT1000() *Opts
func DefaultOptions ¶
func DefaultOptions() *Opts