Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proximity ¶
type Proximity struct {
Min, Max int // For range checks
// contains filtered or unexported fields
}
Proximity represents a driver for the QRE1113 proximity sensor, configured as a digital circuit. This operates by setting the pin as an output, charging a capacitor, and then switching the pin to an input and waiting for the capacitor to discharge through the sensor. The faster the discharge time, the stronger the reflected signal.
func NewProximity ¶
func NewProximity(pin *io.Gpio) *Proximity
NewProximity creates and initialises a Proximity struct.
Click to show internal directories.
Click to hide internal directories.