Adafruit Library
Public Member Functions | Protected Attributes | List of all members
WipperSnapper_I2C_Driver Class Reference

Base class for I2C Drivers. More...

#include <WipperSnapper_I2C_Driver.h>

Inheritance diagram for WipperSnapper_I2C_Driver:
WipperSnapper_I2C_Driver_ADT7410 WipperSnapper_I2C_Driver_AHTX0 WipperSnapper_I2C_Driver_BH1750 WipperSnapper_I2C_Driver_BME280 WipperSnapper_I2C_Driver_BME680 WipperSnapper_I2C_Driver_BMP280 WipperSnapper_I2C_Driver_BMP3XX WipperSnapper_I2C_Driver_DPS310 WipperSnapper_I2C_Driver_DS2484 WipperSnapper_I2C_Driver_ENS160 WipperSnapper_I2C_Driver_HDC302X WipperSnapper_I2C_Driver_HTS221 WipperSnapper_I2C_Driver_HTU21D WipperSnapper_I2C_Driver_HTU31D WipperSnapper_I2C_Driver_INA219 WipperSnapper_I2C_Driver_LC709203F WipperSnapper_I2C_Driver_LPS22HB WipperSnapper_I2C_Driver_LPS25HB WipperSnapper_I2C_Driver_LPS3XHW WipperSnapper_I2C_Driver_LTR329_LTR303 WipperSnapper_I2C_Driver_LTR390 WipperSnapper_I2C_Driver_MAX17048 WipperSnapper_I2C_Driver_MCP3421 WipperSnapper_I2C_Driver_MCP9808 WipperSnapper_I2C_Driver_MPL115A2 WipperSnapper_I2C_Driver_MPRLS WipperSnapper_I2C_Driver_MS8607 WipperSnapper_I2C_Driver_NAU7802 WipperSnapper_I2C_Driver_PCT2075 WipperSnapper_I2C_Driver_PM25 WipperSnapper_I2C_Driver_SCD30 WipperSnapper_I2C_Driver_SCD4X WipperSnapper_I2C_Driver_SEN5X WipperSnapper_I2C_Driver_SEN6X WipperSnapper_I2C_Driver_SGP30 WipperSnapper_I2C_Driver_SGP40 WipperSnapper_I2C_Driver_SHT3X WipperSnapper_I2C_Driver_SHT4X WipperSnapper_I2C_Driver_SHTC3 WipperSnapper_I2C_Driver_SI7021 WipperSnapper_I2C_Driver_STEMMA_Soil_Sensor WipperSnapper_I2C_Driver_TMP117 WipperSnapper_I2C_Driver_TSL2591 WipperSnapper_I2C_Driver_VCNL4020 WipperSnapper_I2C_Driver_VCNL4040 WipperSnapper_I2C_Driver_VCNL4200 WipperSnapper_I2C_Driver_VEML7700 WipperSnapper_I2C_Driver_VL53L0X WipperSnapper_I2C_Driver_VL53L1X WipperSnapper_I2C_Driver_VL53L4CD WipperSnapper_I2C_Driver_VL53L4CX WipperSnapper_I2C_Driver_VL6180X

Public Member Functions

 WipperSnapper_I2C_Driver (TwoWire *i2c, uint16_t sensorAddress)
 Instanciates an I2C sensor. More...
 
virtual ~WipperSnapper_I2C_Driver ()
 Destructor for an I2C sensor.
 
bool begin ()
 Initializes the I2C sensor and begins I2C. More...
 
void setSensorPeriod (float period, wippersnapper_i2c_v1_SensorType sensorType)
 Sets the sensor's period, provided a wippersnapper_i2c_v1_SensorType. More...
 
void configureDriver (wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)
 Uses an I2CDeviceInitRequest message to configure the sensors belonging to the driver. More...
 
uint16_t getI2CAddress ()
 Gets the I2C device's address. More...
 
virtual long getSensorCO2Period ()
 Base implementation - Returns the co2 sensor's period, if set. More...
 
virtual long getSensorCO2PeriodPrv ()
 Base implementation - Returns the previous time interval at which the co2 sensor was queried last. More...
 
virtual void setSensorCO2PeriodPrv (long period)
 Sets a timestamp for when the co2 sensor was queried. More...
 
virtual bool getEventCO2 (sensors_event_t *co2Event)
 Gets a sensor's CO2 value. More...
 
virtual long getSensorECO2Period ()
 Base implementation - Returns the eCO2 sensor's period, if set. More...
 
virtual long getSensorECO2PeriodPrv ()
 Base implementation - Returns the previous time interval at which the eCO2 sensor was queried last. More...
 
virtual void setSensorECO2PeriodPrv (long period)
 Sets a timestamp for when the eCO2 sensor was queried. More...
 
virtual bool getEventECO2 (sensors_event_t *eco2Event)
 Gets a sensor's eCO2 value. More...
 
virtual long getSensorTVOCPeriod ()
 Base implementation - Returns the TVOC sensor's period, if set. More...
 
virtual long getSensorTVOCPeriodPrv ()
 Base implementation - Returns the previous time interval at which the TVOC sensor was queried last. More...
 
virtual void setSensorTVOCPeriodPrv (long period)
 Sets a timestamp for when the TVOC sensor was queried. More...
 
virtual bool getEventTVOC (sensors_event_t *tvocEvent)
 Gets a sensor's TVOC value. More...
 
virtual long getSensorAmbientTempPeriod ()
 Base implementation - Returns the ambient temperature (°C) sensor's period, if set. More...
 
virtual long getSensorAmbientTempPeriodPrv ()
 Base implementation - Returns the previous time interval at which the ambient temperature sensor (°C) was queried last. More...
 
virtual void setSensorAmbientTempPeriodPrv (long periodPrv)
 Sets a timestamp for when the ambient temperature sensor (°C) was queried. More...
 
virtual bool getEventAmbientTemp (sensors_event_t *tempEvent)
 Base implementation - Reads an ambient temperature sensor (°C). Expects value to return in the proper SI unit. More...
 
virtual long getSensorRelativeHumidityPeriod ()
 Base implementation - Returns the humidity sensor's period, if set. More...
 
virtual long getSensorRelativeHumidityPeriodPrv ()
 Base implementation - Returns the previous time interval at which the humidity sensor was queried last. More...
 
virtual void setSensorRelativeHumidityPeriodPrv (long periodPrv)
 Sets a timestamp for when the temperature sensor was queried. More...
 
virtual bool getEventRelativeHumidity (sensors_event_t *humidEvent)
 Base implementation - Reads a humidity sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPressurePeriod ()
 Base implementation - Returns the pressure sensor's period, if set. More...
 
virtual long getSensorPressurePeriodPrv ()
 Base implementation - Returns the previous time interval at which the pressure sensor was queried last. More...
 
virtual void setSensorPressurePeriodPrv (long period)
 Sets a timestamp for when the pressure sensor was queried. More...
 
virtual bool getEventPressure (sensors_event_t *pressureEvent)
 Base implementation - Reads a pressure sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorAltitudePeriod ()
 Base implementation - Returns the Altitude sensor's period, if set. More...
 
virtual long getSensorAltitudePeriodPrv ()
 Base implementation - Returns the previous time interval at which the Altitude sensor was queried last. More...
 
virtual void setSensorAltitudePeriodPrv (long period)
 Sets a timestamp for when the Altitude sensor was queried. More...
 
virtual bool getEventAltitude (sensors_event_t *altitudeEvent)
 Base implementation - Reads a Altitude sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorObjectTempPeriod ()
 Base implementation - Returns the object temperature sensor's period, if set. More...
 
virtual long getSensorObjectTempPeriodPrv ()
 Base implementation - Returns the previous time interval at which the object temperature sensor was queried last. More...
 
virtual void setSensorObjectTempPeriodPrv (long period)
 Sets a timestamp for when the object temperature sensor was queried. More...
 
virtual bool getEventObjectTemp (sensors_event_t *objectTempEvent)
 Base implementation - Reads a object temperature sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorLightPeriod ()
 Base implementation - Returns the object light sensor's period, if set. More...
 
virtual long getSensorLightPeriodPrv ()
 Base implementation - Returns the previous time interval at which the light sensor was queried last. More...
 
virtual void setSensorLightPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventLight (sensors_event_t *lightEvent)
 Base implementation - Reads a object light sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM10_STDPeriod ()
 Base implementation - Returns the object pm10 standard sensors' period, if set. More...
 
virtual long getSensorPM10_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm10 std. sensor was queried last. More...
 
virtual void setSensorPM10_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM10_STD (sensors_event_t *pm10StdEvent)
 Base implementation - Reads a object pm10 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM25_STDPeriod ()
 Base implementation - Returns the object pm25 standard sensors' period, if set. More...
 
virtual long getSensorPM25_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm25 std. sensor was queried last. More...
 
virtual void setSensorPM25_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM25_STD (sensors_event_t *pm25StdEvent)
 Base implementation - Reads a object pm25 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM100_STDPeriod ()
 Base implementation - Returns the object pm100 standard sensors' period, if set. More...
 
virtual long getSensorPM100_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm100 std. sensor was queried last. More...
 
virtual void setSensorPM100_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM100_STD (sensors_event_t *pm100StdEvent)
 Base implementation - Reads a object pm100 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorUnitlessPercentPeriod ()
 Base implementation - Returns the object unitless % sensor period, if set. More...
 
virtual long getSensorUnitlessPercentPeriodPrv ()
 Base implementation - Returns the previous time interval at which the unitless % sensor was queried last. More...
 
virtual void setSensorUnitlessPercentPeriodPrv (long period)
 Sets a timestamp for when the unitless % sensor was queried. More...
 
virtual bool getEventUnitlessPercent (sensors_event_t *unitlessPercentEvent)
 Base implementation - Reads a object unitless % std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorVoltagePeriod ()
 Base implementation - Returns the voltage sensor's period. More...
 
virtual long getSensorVoltagePeriodPrv ()
 Base implementation - Returns the previous time interval at which the voltage sensor was queried last. More...
 
virtual void setSensorVoltagePeriodPrv (long period)
 Sets a timestamp for when the voltage sensor was queried. More...
 
virtual bool getEventVoltage (sensors_event_t *voltageEvent)
 Base implementation - Reads a voltage sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorCurrentPeriod ()
 Base implementation - Returns the current sensor's period. More...
 
virtual long getSensorCurrentPeriodPrv ()
 Base implementation - Returns the previous time interval at which the current sensor was queried last. More...
 
virtual void setSensorCurrentPeriodPrv (long period)
 Sets a timestamp for when the current sensor was queried. More...
 
virtual bool getEventCurrent (sensors_event_t *currentEvent)
 Base implementation - Reads a current sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorRawPeriod ()
 Base implementation - Returns the raw sensor's period, if set. More...
 
virtual long getSensorRawPeriodPrv ()
 Base implementation - Returns the previous time interval at which the raw sensor was queried last. More...
 
virtual void setSensorRawPeriodPrv (long period)
 Sets a timestamp for when the raw sensor was queried. More...
 
virtual bool getEventRaw (sensors_event_t *rawEvent)
 Gets a sensor's Raw value. More...
 
virtual void disableAmbientTempF ()
 Disables the device's ambient temperature (°F) sensor, if it exists.
 
virtual long getSensorAmbientTempFPeriod ()
 Base implementation - Returns the ambient temperature (°F) sensor's period, if set. More...
 
virtual long getSensorAmbientTempFPeriodPrv ()
 Base implementation - Returns the previous time interval at which the ambient temperature sensor (°F) was queried last. More...
 
virtual void setSensorAmbientTempFPeriodPrv (long period)
 Sets a timestamp for when the ambient temperature sensor (°F) was queried. More...
 
virtual bool getEventAmbientTempF (sensors_event_t *AmbientTempFEvent)
 Helper function to obtain a sensor's ambient temperature value in °F. Requires getEventAmbientTemp() to be fully implemented by a driver. More...
 
virtual long getSensorObjectTempFPeriod ()
 Base implementation - Returns the object temperature (°F) sensor's period, if set. More...
 
virtual long getSensorObjectTempFPeriodPrv ()
 Base implementation - Returns the previous time interval at which the object temperature sensor (°F) was queried last. More...
 
virtual void setSensorObjectTempFPeriodPrv (long period)
 Sets a timestamp for when the object temperature sensor (°F) was queried. More...
 
virtual bool getEventObjectTempF (sensors_event_t *objectTempFEvent)
 Helper function to obtain a sensor's object temperature value in °F. Requires getEventObjectTemp() to be fully implemented by a driver. More...
 
virtual long getSensorGasResistancePeriod ()
 Base implementation - Returns the gas resistance (ohms) sensor's period, if set. More...
 
virtual long getSensorGasResistancePeriodPrv ()
 Base implementation - Returns the previous time interval at which the gas resistance sensor (ohms) was queried last. More...
 
virtual void setSensorGasResistancePeriodPrv (long period)
 Sets a timestamp for when the object gas resistance sensor was queried. More...
 
virtual bool getEventGasResistance (sensors_event_t *gasEvent)
 Base implementation - Reads a gas resistance sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorNOxIndexPeriod ()
 Base implementation - Returns the NOx Index sensor's period, if set. More...
 
virtual long getSensorNOxIndexPeriodPrv ()
 Base implementation - Returns the previous time interval at which the NOx Index sensor was queried last. More...
 
virtual void setSensorNOxIndexPeriodPrv (long period)
 Sets a timestamp for when the object NOx Index sensor was queried. More...
 
virtual bool getEventNOxIndex (sensors_event_t *gasEvent)
 Base implementation - Reads a NOx Index sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorVOCIndexPeriod ()
 Base implementation - Returns the VOC Index sensor's period, if set. More...
 
virtual long getSensorVOCIndexPeriodPrv ()
 Base implementation - Returns the previous time interval at which the VOC Index sensor was queried last. More...
 
virtual void setSensorVOCIndexPeriodPrv (long period)
 Sets a timestamp for when the object VOC Index sensor was queried. More...
 
virtual bool getEventVOCIndex (sensors_event_t *gasEvent)
 Base implementation - Reads a VOC Index sensor and converts the reading into the expected SI unit. More...
 
virtual void enableSensorProximity ()
 Enables the device's proximity sensor, if it exists.
 
virtual void disableSensorProximity ()
 Disables the device's object proximity sensor, if it exists.
 
virtual long sensorProximityPeriod ()
 Base implementation - Returns the proximity sensor's period, if set. More...
 
virtual void setSensorProximityPeriod (long period)
 Set the proximity sensor's return frequency. More...
 
virtual long SensorProximityPeriodPrv ()
 Base implementation - Returns the previous time interval at which the proximity sensor was queried last. More...
 
virtual void setSensorProximityPeriodPrv (long period)
 Sets a timestamp for when the proximity sensor was queried. More...
 
virtual bool getEventProximity (sensors_event_t *proximityEvent)
 Base implementation - Reads a proximity sensor and converts the reading into the expected SI unit. More...
 
virtual void updateSensorProximity (float period)
 Updates the properties of a proximity sensor. More...
 

Protected Attributes

TwoWire * _i2c
 Pointer to the I2C driver's Wire object.
 
uint16_t _sensorAddress
 The I2C driver's unique I2C address.
 
long _tempSensorPeriod
 The time period between reading the temperature sensor's value. More...
 
long _tempSensorPeriodPrv
 
long _humidSensorPeriod
 The time period between reading the humidity sensor's value. More...
 
long _humidSensorPeriodPrv
 
long _pressureSensorPeriod
 The time period between reading the pressure sensor's value. More...
 
long _pressureSensorPeriodPrv
 
long _CO2SensorPeriod
 The time period between reading the CO2 sensor's value. More...
 
long _CO2SensorPeriodPrv
 The time when the CO2 sensor was last read. More...
 
long _ECO2SensorPeriod
 The time period between reading the eCO2 sensor's value. More...
 
long _ECO2SensorPeriodPrv
 The time when the eCO2 sensor was last read. More...
 
long _TVOCSensorPeriod
 The time period between reading the TVOC sensor's value. More...
 
long _TVOCSensorPeriodPrv
 The time when the TVOC sensor was last read. More...
 
long _altitudeSensorPeriod
 The time period between reading the altitude sensor's value. More...
 
long _altitudeSensorPeriodPrv
 
long _objectTempSensorPeriod = 0L
 
long _objectTempSensorPeriodPrv
 
long _lightSensorPeriod
 The time period between reading the light sensor's value. More...
 
long _lightSensorPeriodPrv
 
long _PM10SensorPeriod
 The time period between reading the pm25 sensor's value. More...
 
long _PM10SensorPeriodPrv
 The time when the pm25 sensor was last read. More...
 
long _PM25SensorPeriod
 The time period between reading the pm25 sensor's value. More...
 
long _PM25SensorPeriodPrv
 The time when the pm25 sensor was last read. More...
 
long _PM100SensorPeriod
 The time period between reading the pm100_std sensor's value. More...
 
long _PM100SensorPeriodPrv
 
long _unitlessPercentPeriod
 The time period between reading the unitless % sensor's value. More...
 
long _unitlessPercentPeriodPrv
 
long _voltagePeriod
 The time period between reading the voltage sensor's value. More...
 
long _voltagePeriodPrv
 
long _currentPeriod
 The time period between reading the current sensor's value. More...
 
long _currentPeriodPrv
 
long _rawSensorPeriod
 The time period between reading the Raw sensor's value. More...
 
long _rawSensorPeriodPrv
 The time when the Raw sensor was last read. More...
 
long _ambientTempFPeriod = 0L
 
long _ambientTempFPeriodPrv
 
long _objectTempFPeriod = 0L
 
long _objectTempFPeriodPrv
 
long _gasResistancePeriod = 0L
 
long _gasResistancePeriodPrv
 
long _NOxIndexPeriod
 The time period between reading the NOx Index sensor's value. More...
 
long _NOxIndexPeriodPrv
 
long _VOCIndexPeriod
 The time period between reading the VOC Index sensor's value. More...
 
long _VOCIndexPeriodPrv
 
long _proximitySensorPeriod
 The time period between reading the proximity sensor's value. More...
 
long _proximitySensorPeriodPrv
 

Detailed Description

Base class for I2C Drivers.

Constructor & Destructor Documentation

◆ WipperSnapper_I2C_Driver()

WipperSnapper_I2C_Driver::WipperSnapper_I2C_Driver ( TwoWire *  i2c,
uint16_t  sensorAddress 
)
inline

Instanciates an I2C sensor.

Parameters
i2cThe I2C hardware interface, default is Wire.
sensorAddressThe I2C sensor's unique address.

Member Function Documentation

◆ begin()

bool WipperSnapper_I2C_Driver::begin ( )
inline

Initializes the I2C sensor and begins I2C.

Returns
True if initialized successfully, False otherwise.

◆ setSensorPeriod()

void WipperSnapper_I2C_Driver::setSensorPeriod ( float  period,
wippersnapper_i2c_v1_SensorType  sensorType 
)
inline

Sets the sensor's period, provided a wippersnapper_i2c_v1_SensorType.

Parameters
periodThe period for the sensor to return values within, in seconds.
sensorTypeThe type of sensor device.

◆ configureDriver()

void WipperSnapper_I2C_Driver::configureDriver ( wippersnapper_i2c_v1_I2CDeviceInitRequest *  msgDeviceInitReq)
inline

Uses an I2CDeviceInitRequest message to configure the sensors belonging to the driver.

Parameters
msgDeviceInitReqI2CDeviceInitRequest containing a list of I2C device properties.

◆ getI2CAddress()

uint16_t WipperSnapper_I2C_Driver::getI2CAddress ( )
inline

Gets the I2C device's address.

Returns
The I2C device's unique i2c address.

◆ getSensorCO2Period()

virtual long WipperSnapper_I2C_Driver::getSensorCO2Period ( )
inlinevirtual

Base implementation - Returns the co2 sensor's period, if set.

Returns
Time when the co2 sensor should be polled, in seconds.

◆ getSensorCO2PeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorCO2PeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the co2 sensor was queried last.

Returns
Time when the co2 sensor was last queried, in seconds.

◆ setSensorCO2PeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorCO2PeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the co2 sensor was queried.

Parameters
periodThe time when the co2 sensor was queried last.

◆ getEventCO2()

virtual bool WipperSnapper_I2C_Driver::getEventCO2 ( sensors_event_t *  co2Event)
inlinevirtual

Gets a sensor's CO2 value.

Parameters
co2EventThe CO2 value, in ppm.
Returns
True if the sensor value was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_SEN6X, WipperSnapper_I2C_Driver_SCD30, and WipperSnapper_I2C_Driver_SCD4X.

◆ getSensorECO2Period()

virtual long WipperSnapper_I2C_Driver::getSensorECO2Period ( )
inlinevirtual

Base implementation - Returns the eCO2 sensor's period, if set.

Returns
Time when the eCO2 sensor should be polled, in seconds.

◆ getSensorECO2PeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorECO2PeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the eCO2 sensor was queried last.

Returns
Time when the eCO2 sensor was last queried, in seconds.

◆ setSensorECO2PeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorECO2PeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the eCO2 sensor was queried.

Parameters
periodThe time when the CO2 sensor was queried last.

◆ getEventECO2()

virtual bool WipperSnapper_I2C_Driver::getEventECO2 ( sensors_event_t *  eco2Event)
inlinevirtual

Gets a sensor's eCO2 value.

Parameters
eco2EventThe equivalent CO2 value, in ppm.
Returns
True if the sensor value was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_ENS160, and WipperSnapper_I2C_Driver_SGP30.

◆ getSensorTVOCPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorTVOCPeriod ( )
inlinevirtual

Base implementation - Returns the TVOC sensor's period, if set.

Returns
Time when the TVOC sensor should be polled, in seconds.

◆ getSensorTVOCPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorTVOCPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the TVOC sensor was queried last.

Returns
Time when the TVOC sensor was last queried, in seconds.

◆ setSensorTVOCPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorTVOCPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the TVOC sensor was queried.

Parameters
periodThe time when the TVOC sensor was queried last.

◆ getEventTVOC()

virtual bool WipperSnapper_I2C_Driver::getEventTVOC ( sensors_event_t *  tvocEvent)
inlinevirtual

Gets a sensor's TVOC value.

Parameters
tvocEventThe Total Volatile Organic Compounds value, in ppb.
Returns
True if the sensor value was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_ENS160, and WipperSnapper_I2C_Driver_SGP30.

◆ getSensorAmbientTempPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorAmbientTempPeriod ( )
inlinevirtual

Base implementation - Returns the ambient temperature (°C) sensor's period, if set.

Returns
Time when the temperature sensor should be polled, in seconds.

◆ getSensorAmbientTempPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorAmbientTempPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the ambient temperature sensor (°C) was queried last.

Returns
Time when the ambient temperature sensor (°C) was last queried, in seconds.

◆ setSensorAmbientTempPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorAmbientTempPeriodPrv ( long  periodPrv)
inlinevirtual

Sets a timestamp for when the ambient temperature sensor (°C) was queried.

Parameters
periodPrvThe time when the ambient temperature sensor (°C) was queried last.

◆ getEventAmbientTemp()

virtual bool WipperSnapper_I2C_Driver::getEventAmbientTemp ( sensors_event_t *  tempEvent)
inlinevirtual

◆ getSensorRelativeHumidityPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorRelativeHumidityPeriod ( )
inlinevirtual

Base implementation - Returns the humidity sensor's period, if set.

Returns
Time when the humidity sensor should be polled, in seconds.

◆ getSensorRelativeHumidityPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorRelativeHumidityPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the humidity sensor was queried last.

Returns
Time when the humidity sensor was last queried, in seconds.

◆ setSensorRelativeHumidityPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorRelativeHumidityPeriodPrv ( long  periodPrv)
inlinevirtual

Sets a timestamp for when the temperature sensor was queried.

Parameters
periodPrvThe time when the temperature sensor was queried last.

◆ getEventRelativeHumidity()

virtual bool WipperSnapper_I2C_Driver::getEventRelativeHumidity ( sensors_event_t *  humidEvent)
inlinevirtual

◆ getSensorPressurePeriod()

virtual long WipperSnapper_I2C_Driver::getSensorPressurePeriod ( )
inlinevirtual

Base implementation - Returns the pressure sensor's period, if set.

Returns
Time when the pressure sensor should be polled, in seconds.

◆ getSensorPressurePeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorPressurePeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the pressure sensor was queried last.

Returns
Time when the pressure sensor was last queried, in seconds.

◆ setSensorPressurePeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorPressurePeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the pressure sensor was queried.

Parameters
periodThe time when the pressure sensor was queried last.

◆ getEventPressure()

virtual bool WipperSnapper_I2C_Driver::getEventPressure ( sensors_event_t *  pressureEvent)
inlinevirtual

Base implementation - Reads a pressure sensor and converts the reading into the expected SI unit.

Parameters
pressureEventPointer to an Adafruit_Sensor event.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_BME680, WipperSnapper_I2C_Driver_BME280, WipperSnapper_I2C_Driver_MS8607, WipperSnapper_I2C_Driver_BMP280, WipperSnapper_I2C_Driver_DPS310, WipperSnapper_I2C_Driver_BMP3XX, WipperSnapper_I2C_Driver_LPS22HB, WipperSnapper_I2C_Driver_LPS25HB, WipperSnapper_I2C_Driver_LPS3XHW, WipperSnapper_I2C_Driver_MPL115A2, and WipperSnapper_I2C_Driver_MPRLS.

◆ getSensorAltitudePeriod()

virtual long WipperSnapper_I2C_Driver::getSensorAltitudePeriod ( )
inlinevirtual

Base implementation - Returns the Altitude sensor's period, if set.

Returns
Time when the Altitude sensor should be polled, in seconds.

◆ getSensorAltitudePeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorAltitudePeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the Altitude sensor was queried last.

Returns
Time when the Altitude sensor was last queried, in seconds.

◆ setSensorAltitudePeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorAltitudePeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the Altitude sensor was queried.

Parameters
periodThe time when the Altitude sensor was queried last.

◆ getEventAltitude()

virtual bool WipperSnapper_I2C_Driver::getEventAltitude ( sensors_event_t *  altitudeEvent)
inlinevirtual

Base implementation - Reads a Altitude sensor and converts the reading into the expected SI unit.

Parameters
altitudeEventAltitude reading, in meters.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_BME680, WipperSnapper_I2C_Driver_BME280, WipperSnapper_I2C_Driver_BMP280, and WipperSnapper_I2C_Driver_BMP3XX.

◆ getSensorObjectTempPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorObjectTempPeriod ( )
inlinevirtual

Base implementation - Returns the object temperature sensor's period, if set.

Returns
Time when the object temperature sensor should be polled, in seconds.

◆ getSensorObjectTempPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorObjectTempPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the object temperature sensor was queried last.

Returns
Time when the object temperature sensor was last queried, in seconds.

◆ setSensorObjectTempPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorObjectTempPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the object temperature sensor was queried.

Parameters
periodThe time when the object temperature sensor was queried last.

◆ getEventObjectTemp()

virtual bool WipperSnapper_I2C_Driver::getEventObjectTemp ( sensors_event_t *  objectTempEvent)
inlinevirtual

Base implementation - Reads a object temperature sensor and converts the reading into the expected SI unit.

Parameters
objectTempEventobject temperature sensor reading, in meters.
Returns
True if the sensor event was obtained successfully, False otherwise.

◆ getSensorLightPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorLightPeriod ( )
inlinevirtual

Base implementation - Returns the object light sensor's period, if set.

Returns
Time when the object light sensor should be polled, in seconds.

◆ getSensorLightPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorLightPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the light sensor was queried last.

Returns
Time when the light sensor was last queried, in seconds.

◆ setSensorLightPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorLightPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the light sensor was queried.

Parameters
periodThe time when the light sensor was queried last.

◆ getEventLight()

virtual bool WipperSnapper_I2C_Driver::getEventLight ( sensors_event_t *  lightEvent)
inlinevirtual

Base implementation - Reads a object light sensor and converts the reading into the expected SI unit.

Parameters
lightEventLight sensor reading, in meters.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_VL6180X, WipperSnapper_I2C_Driver_VCNL4040, WipperSnapper_I2C_Driver_VCNL4200, WipperSnapper_I2C_Driver_LTR390, WipperSnapper_I2C_Driver_LTR329_LTR303, WipperSnapper_I2C_Driver_TSL2591, WipperSnapper_I2C_Driver_BH1750, WipperSnapper_I2C_Driver_VEML7700, and WipperSnapper_I2C_Driver_VCNL4020.

◆ getSensorPM10_STDPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorPM10_STDPeriod ( )
inlinevirtual

Base implementation - Returns the object pm10 standard sensors' period, if set.

Returns
Time when the object pm10 standard sensor should be polled, in seconds.

◆ getSensorPM10_STDPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorPM10_STDPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the pm10 std. sensor was queried last.

Returns
Time when the pm10 std. sensor was last queried, in seconds.

◆ setSensorPM10_STDPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorPM10_STDPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the light sensor was queried.

Parameters
periodThe time when the light sensor was queried last.

◆ getEventPM10_STD()

virtual bool WipperSnapper_I2C_Driver::getEventPM10_STD ( sensors_event_t *  pm10StdEvent)
inlinevirtual

Base implementation - Reads a object pm10 std. sensor and converts the reading into the expected SI unit.

Parameters
pm10StdEventpm10 std. sensor reading, in ppm.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_SEN6X, WipperSnapper_I2C_Driver_SEN5X, and WipperSnapper_I2C_Driver_PM25.

◆ getSensorPM25_STDPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorPM25_STDPeriod ( )
inlinevirtual

Base implementation - Returns the object pm25 standard sensors' period, if set.

Returns
Time when the object pm25 standard sensor should be polled, in seconds.

◆ getSensorPM25_STDPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorPM25_STDPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the pm25 std. sensor was queried last.

Returns
Time when the pm25 std. sensor was last queried, in seconds.

◆ setSensorPM25_STDPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorPM25_STDPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the light sensor was queried.

Parameters
periodThe time when the light sensor was queried last.

◆ getEventPM25_STD()

virtual bool WipperSnapper_I2C_Driver::getEventPM25_STD ( sensors_event_t *  pm25StdEvent)
inlinevirtual

Base implementation - Reads a object pm25 std. sensor and converts the reading into the expected SI unit.

Parameters
pm25StdEventpm25 std. sensor reading, in ppm.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_SEN6X, WipperSnapper_I2C_Driver_SEN5X, and WipperSnapper_I2C_Driver_PM25.

◆ getSensorPM100_STDPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorPM100_STDPeriod ( )
inlinevirtual

Base implementation - Returns the object pm100 standard sensors' period, if set.

Returns
Time when the object pm100 standard sensor should be polled, in seconds.

◆ getSensorPM100_STDPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorPM100_STDPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the pm100 std. sensor was queried last.

Returns
Time when the pm100 std. sensor was last queried, in seconds.

◆ setSensorPM100_STDPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorPM100_STDPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the light sensor was queried.

Parameters
periodThe time when the light sensor was queried last.

◆ getEventPM100_STD()

virtual bool WipperSnapper_I2C_Driver::getEventPM100_STD ( sensors_event_t *  pm100StdEvent)
inlinevirtual

Base implementation - Reads a object pm100 std. sensor and converts the reading into the expected SI unit.

Parameters
pm100StdEventpm100 std. sensor reading, in ppm.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_SEN6X, WipperSnapper_I2C_Driver_SEN5X, and WipperSnapper_I2C_Driver_PM25.

◆ getSensorUnitlessPercentPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorUnitlessPercentPeriod ( )
inlinevirtual

Base implementation - Returns the object unitless % sensor period, if set.

Returns
Time when the object unitless % sensor should be polled, in seconds.

◆ getSensorUnitlessPercentPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorUnitlessPercentPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the unitless % sensor was queried last.

Returns
Time when the unitless % sensor was last queried, in seconds.

◆ setSensorUnitlessPercentPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorUnitlessPercentPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the unitless % sensor was queried.

Parameters
periodThe time when the unitless % sensor was queried last.

◆ getEventUnitlessPercent()

virtual bool WipperSnapper_I2C_Driver::getEventUnitlessPercent ( sensors_event_t *  unitlessPercentEvent)
inlinevirtual

Base implementation - Reads a object unitless % std. sensor and converts the reading into the expected SI unit.

Parameters
unitlessPercentEventunitless % sensor reading.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_LC709203F, and WipperSnapper_I2C_Driver_MAX17048.

◆ getSensorVoltagePeriod()

virtual long WipperSnapper_I2C_Driver::getSensorVoltagePeriod ( )
inlinevirtual

Base implementation - Returns the voltage sensor's period.

Returns
Time when the object voltage sensor should be polled, in seconds.

◆ getSensorVoltagePeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorVoltagePeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the voltage sensor was queried last.

Returns
Time when the voltage sensor was last queried, in seconds.

◆ setSensorVoltagePeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorVoltagePeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the voltage sensor was queried.

Parameters
periodThe time when the voltage sensor was queried last.

◆ getEventVoltage()

virtual bool WipperSnapper_I2C_Driver::getEventVoltage ( sensors_event_t *  voltageEvent)
inlinevirtual

Base implementation - Reads a voltage sensor and converts the reading into the expected SI unit.

Parameters
voltageEventvoltage sensor reading, in volts.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_LC709203F, WipperSnapper_I2C_Driver_INA219, and WipperSnapper_I2C_Driver_MAX17048.

◆ getSensorCurrentPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorCurrentPeriod ( )
inlinevirtual

Base implementation - Returns the current sensor's period.

Returns
Time when the object current sensor should be polled, in seconds.

◆ getSensorCurrentPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorCurrentPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the current sensor was queried last.

Returns
Time when the current sensor was last queried, in seconds.

◆ setSensorCurrentPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorCurrentPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the current sensor was queried.

Parameters
periodThe time when the current sensor was queried last.

◆ getEventCurrent()

virtual bool WipperSnapper_I2C_Driver::getEventCurrent ( sensors_event_t *  currentEvent)
inlinevirtual

Base implementation - Reads a current sensor and converts the reading into the expected SI unit.

Parameters
currentEventcurrent sensor reading, in volts.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_INA219.

◆ getSensorRawPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorRawPeriod ( )
inlinevirtual

Base implementation - Returns the raw sensor's period, if set.

Returns
Time when the raw sensor should be polled, in seconds.

◆ getSensorRawPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorRawPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the raw sensor was queried last.

Returns
Time when the raw sensor was last queried, in seconds.

◆ setSensorRawPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorRawPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the raw sensor was queried.

Parameters
periodThe time when the raw sensor was queried last.

◆ getEventRaw()

virtual bool WipperSnapper_I2C_Driver::getEventRaw ( sensors_event_t *  rawEvent)
inlinevirtual

◆ getSensorAmbientTempFPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorAmbientTempFPeriod ( )
inlinevirtual

Base implementation - Returns the ambient temperature (°F) sensor's period, if set.

Returns
Time when the ambient temperature sensor should be polled, in seconds.

◆ getSensorAmbientTempFPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorAmbientTempFPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the ambient temperature sensor (°F) was queried last.

Returns
Time when the ambient temperature sensor was last queried, in seconds.

◆ setSensorAmbientTempFPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorAmbientTempFPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the ambient temperature sensor (°F) was queried.

Parameters
periodThe time when the ambient temperature sensor (°F) was queried last.

◆ getEventAmbientTempF()

virtual bool WipperSnapper_I2C_Driver::getEventAmbientTempF ( sensors_event_t *  AmbientTempFEvent)
inlinevirtual

Helper function to obtain a sensor's ambient temperature value in °F. Requires getEventAmbientTemp() to be fully implemented by a driver.

Parameters
AmbientTempFEventThe ambient temperature value, in °F.
Returns
True if the sensor value was obtained successfully, False otherwise.

◆ getSensorObjectTempFPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorObjectTempFPeriod ( )
inlinevirtual

Base implementation - Returns the object temperature (°F) sensor's period, if set.

Returns
Time when the object temperature sensor should be polled, in seconds.

◆ getSensorObjectTempFPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorObjectTempFPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the object temperature sensor (°F) was queried last.

Returns
Time when the object temperature sensor was last queried, in seconds.

◆ setSensorObjectTempFPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorObjectTempFPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the object temperature sensor (°F) was queried.

Parameters
periodThe time when the object temperature sensor (°F) was queried last.

◆ getEventObjectTempF()

virtual bool WipperSnapper_I2C_Driver::getEventObjectTempF ( sensors_event_t *  objectTempFEvent)
inlinevirtual

Helper function to obtain a sensor's object temperature value in °F. Requires getEventObjectTemp() to be fully implemented by a driver.

Parameters
objectTempFEventThe object temperature value, in °F.
Returns
True if the sensor value was obtained successfully, False otherwise.

◆ getSensorGasResistancePeriod()

virtual long WipperSnapper_I2C_Driver::getSensorGasResistancePeriod ( )
inlinevirtual

Base implementation - Returns the gas resistance (ohms) sensor's period, if set.

Returns
Time when the gas resistance sensor should be polled, in seconds.

◆ getSensorGasResistancePeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorGasResistancePeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the gas resistance sensor (ohms) was queried last.

Returns
Time when the gas resistance sensor was last queried, in seconds.

◆ setSensorGasResistancePeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorGasResistancePeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the object gas resistance sensor was queried.

Parameters
periodThe time when the gas resistance sensor was queried last.

◆ getEventGasResistance()

virtual bool WipperSnapper_I2C_Driver::getEventGasResistance ( sensors_event_t *  gasEvent)
inlinevirtual

Base implementation - Reads a gas resistance sensor and converts the reading into the expected SI unit.

Parameters
gasEventgas resistance sensor reading, in ohms.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_BME680.

◆ getSensorNOxIndexPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorNOxIndexPeriod ( )
inlinevirtual

Base implementation - Returns the NOx Index sensor's period, if set.

Returns
Time when the NOx Index sensor should be polled, in seconds.

◆ getSensorNOxIndexPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorNOxIndexPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the NOx Index sensor was queried last.

Returns
Time when the NOx Index sensor was last queried, in seconds.

◆ setSensorNOxIndexPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorNOxIndexPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the object NOx Index sensor was queried.

Parameters
periodThe time when the NOx Index sensor was queried last.

◆ getEventNOxIndex()

virtual bool WipperSnapper_I2C_Driver::getEventNOxIndex ( sensors_event_t *  gasEvent)
inlinevirtual

Base implementation - Reads a NOx Index sensor and converts the reading into the expected SI unit.

Parameters
gasEventNOx Index sensor reading, unitless.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_SEN6X, and WipperSnapper_I2C_Driver_SEN5X.

◆ getSensorVOCIndexPeriod()

virtual long WipperSnapper_I2C_Driver::getSensorVOCIndexPeriod ( )
inlinevirtual

Base implementation - Returns the VOC Index sensor's period, if set.

Returns
Time when the VOC Index sensor should be polled, in seconds.

◆ getSensorVOCIndexPeriodPrv()

virtual long WipperSnapper_I2C_Driver::getSensorVOCIndexPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the VOC Index sensor was queried last.

Returns
Time when the VOC Index sensor was last queried, in seconds.

◆ setSensorVOCIndexPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorVOCIndexPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the object VOC Index sensor was queried.

Parameters
periodThe time when the VOC Index sensor was queried last.

◆ getEventVOCIndex()

virtual bool WipperSnapper_I2C_Driver::getEventVOCIndex ( sensors_event_t *  gasEvent)
inlinevirtual

Base implementation - Reads a VOC Index sensor and converts the reading into the expected SI unit.

Parameters
gasEventVOC Index sensor reading, unitless.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_SEN6X, WipperSnapper_I2C_Driver_SEN5X, and WipperSnapper_I2C_Driver_SGP40.

◆ sensorProximityPeriod()

virtual long WipperSnapper_I2C_Driver::sensorProximityPeriod ( )
inlinevirtual

Base implementation - Returns the proximity sensor's period, if set.

Returns
Time when the roximity sensor should be polled, in seconds.

◆ setSensorProximityPeriod()

virtual void WipperSnapper_I2C_Driver::setSensorProximityPeriod ( long  period)
inlinevirtual

Set the proximity sensor's return frequency.

Parameters
periodThe time interval at which to return new data from the proximity sensor.

◆ SensorProximityPeriodPrv()

virtual long WipperSnapper_I2C_Driver::SensorProximityPeriodPrv ( )
inlinevirtual

Base implementation - Returns the previous time interval at which the proximity sensor was queried last.

Returns
Time when the proximity sensor was last queried, in seconds.

◆ setSensorProximityPeriodPrv()

virtual void WipperSnapper_I2C_Driver::setSensorProximityPeriodPrv ( long  period)
inlinevirtual

Sets a timestamp for when the proximity sensor was queried.

Parameters
periodThe time when the proximity sensor was queried last.

◆ getEventProximity()

virtual bool WipperSnapper_I2C_Driver::getEventProximity ( sensors_event_t *  proximityEvent)
inlinevirtual

Base implementation - Reads a proximity sensor and converts the reading into the expected SI unit.

Parameters
proximityEventProximity sensor reading, in millimeters.
Returns
True if the sensor event was obtained successfully, False otherwise.

Reimplemented in WipperSnapper_I2C_Driver_VL53L4CD, WipperSnapper_I2C_Driver_VCNL4040, WipperSnapper_I2C_Driver_VL53L4CX, WipperSnapper_I2C_Driver_VCNL4200, WipperSnapper_I2C_Driver_VCNL4020, WipperSnapper_I2C_Driver_VL53L1X, WipperSnapper_I2C_Driver_VL53L0X, and WipperSnapper_I2C_Driver_VL6180X.

◆ updateSensorProximity()

virtual void WipperSnapper_I2C_Driver::updateSensorProximity ( float  period)
inlinevirtual

Updates the properties of a proximity sensor.

Parameters
periodThe time interval at which to return new data from the proimity sensor.

Member Data Documentation

◆ _tempSensorPeriod

long WipperSnapper_I2C_Driver::_tempSensorPeriod
protected
Initial value:
=
0L

The time period between reading the temperature sensor's value.

◆ _tempSensorPeriodPrv

long WipperSnapper_I2C_Driver::_tempSensorPeriodPrv
protected
Initial value:

The time when the temperature sensor was last read

◆ _humidSensorPeriod

long WipperSnapper_I2C_Driver::_humidSensorPeriod
protected
Initial value:
=
0L

The time period between reading the humidity sensor's value.

◆ _humidSensorPeriodPrv

long WipperSnapper_I2C_Driver::_humidSensorPeriodPrv
protected
Initial value:

The time when the humidity sensor was last read.

◆ _pressureSensorPeriod

long WipperSnapper_I2C_Driver::_pressureSensorPeriod
protected
Initial value:
=
0L

The time period between reading the pressure sensor's value.

◆ _pressureSensorPeriodPrv

long WipperSnapper_I2C_Driver::_pressureSensorPeriodPrv
protected
Initial value:

The time when the pressure sensor was last read.

◆ _CO2SensorPeriod

long WipperSnapper_I2C_Driver::_CO2SensorPeriod
protected
Initial value:
=
0L

The time period between reading the CO2 sensor's value.

◆ _CO2SensorPeriodPrv

long WipperSnapper_I2C_Driver::_CO2SensorPeriodPrv
protected
Initial value:

The time when the CO2 sensor was last read.

◆ _ECO2SensorPeriod

long WipperSnapper_I2C_Driver::_ECO2SensorPeriod
protected
Initial value:
=
0L

The time period between reading the eCO2 sensor's value.

◆ _ECO2SensorPeriodPrv

long WipperSnapper_I2C_Driver::_ECO2SensorPeriodPrv
protected
Initial value:

The time when the eCO2 sensor was last read.

◆ _TVOCSensorPeriod

long WipperSnapper_I2C_Driver::_TVOCSensorPeriod
protected
Initial value:
=
0L

The time period between reading the TVOC sensor's value.

◆ _TVOCSensorPeriodPrv

long WipperSnapper_I2C_Driver::_TVOCSensorPeriodPrv
protected
Initial value:

The time when the TVOC sensor was last read.

◆ _altitudeSensorPeriod

long WipperSnapper_I2C_Driver::_altitudeSensorPeriod
protected
Initial value:
=
0L

The time period between reading the altitude sensor's value.

◆ _altitudeSensorPeriodPrv

long WipperSnapper_I2C_Driver::_altitudeSensorPeriodPrv
protected
Initial value:

The time when the altitude sensor was last read.

◆ _objectTempSensorPeriod

long WipperSnapper_I2C_Driver::_objectTempSensorPeriod = 0L
protected

The time period between reading the object temperature sensor's value.

◆ _objectTempSensorPeriodPrv

long WipperSnapper_I2C_Driver::_objectTempSensorPeriodPrv
protected
Initial value:

The time when the object temperature sensor was last read.

◆ _lightSensorPeriod

long WipperSnapper_I2C_Driver::_lightSensorPeriod
protected
Initial value:
=
0L

The time period between reading the light sensor's value.

◆ _lightSensorPeriodPrv

long WipperSnapper_I2C_Driver::_lightSensorPeriodPrv
protected
Initial value:

The time when the light sensor was last read.

◆ _PM10SensorPeriod

long WipperSnapper_I2C_Driver::_PM10SensorPeriod
protected
Initial value:
=
0L

The time period between reading the pm25 sensor's value.

◆ _PM10SensorPeriodPrv

long WipperSnapper_I2C_Driver::_PM10SensorPeriodPrv
protected
Initial value:

The time when the pm25 sensor was last read.

◆ _PM25SensorPeriod

long WipperSnapper_I2C_Driver::_PM25SensorPeriod
protected
Initial value:
=
0L

The time period between reading the pm25 sensor's value.

◆ _PM25SensorPeriodPrv

long WipperSnapper_I2C_Driver::_PM25SensorPeriodPrv
protected
Initial value:

The time when the pm25 sensor was last read.

◆ _PM100SensorPeriod

long WipperSnapper_I2C_Driver::_PM100SensorPeriod
protected
Initial value:
=
0L

The time period between reading the pm100_std sensor's value.

◆ _PM100SensorPeriodPrv

long WipperSnapper_I2C_Driver::_PM100SensorPeriodPrv
protected
Initial value:

The time when the pm100_std sensor was last read.

◆ _unitlessPercentPeriod

long WipperSnapper_I2C_Driver::_unitlessPercentPeriod
protected
Initial value:
=
0L

The time period between reading the unitless % sensor's value.

◆ _unitlessPercentPeriodPrv

long WipperSnapper_I2C_Driver::_unitlessPercentPeriodPrv
protected
Initial value:

The time when the unitless % sensor was last read.

◆ _voltagePeriod

long WipperSnapper_I2C_Driver::_voltagePeriod
protected
Initial value:
=
0L

The time period between reading the voltage sensor's value.

◆ _voltagePeriodPrv

long WipperSnapper_I2C_Driver::_voltagePeriodPrv
protected
Initial value:

The time when the voltage sensor was last read.

◆ _currentPeriod

long WipperSnapper_I2C_Driver::_currentPeriod
protected
Initial value:
=
0L

The time period between reading the current sensor's value.

◆ _currentPeriodPrv

long WipperSnapper_I2C_Driver::_currentPeriodPrv
protected
Initial value:

The time when the current sensor was last read.

◆ _rawSensorPeriod

long WipperSnapper_I2C_Driver::_rawSensorPeriod
protected
Initial value:
=
0L

The time period between reading the Raw sensor's value.

◆ _rawSensorPeriodPrv

long WipperSnapper_I2C_Driver::_rawSensorPeriodPrv
protected
Initial value:

The time when the Raw sensor was last read.

◆ _ambientTempFPeriod

long WipperSnapper_I2C_Driver::_ambientTempFPeriod = 0L
protected

The time period between reading the ambient temp. (°F) sensor's value.

◆ _ambientTempFPeriodPrv

long WipperSnapper_I2C_Driver::_ambientTempFPeriodPrv
protected
Initial value:

The time when the ambient temp. (°F) sensor was last read.

◆ _objectTempFPeriod

long WipperSnapper_I2C_Driver::_objectTempFPeriod = 0L
protected

The time period between reading the object temp. (°F) sensor's value.

◆ _objectTempFPeriodPrv

long WipperSnapper_I2C_Driver::_objectTempFPeriodPrv
protected
Initial value:

The time when the object temp. (°F) sensor was last read.

◆ _gasResistancePeriod

long WipperSnapper_I2C_Driver::_gasResistancePeriod = 0L
protected

The time period between reading the gas resistance sensor's value.

◆ _gasResistancePeriodPrv

long WipperSnapper_I2C_Driver::_gasResistancePeriodPrv
protected
Initial value:

The time when the gas resistance sensor was last read.

◆ _NOxIndexPeriod

long WipperSnapper_I2C_Driver::_NOxIndexPeriod
protected
Initial value:
=
0L

The time period between reading the NOx Index sensor's value.

◆ _NOxIndexPeriodPrv

long WipperSnapper_I2C_Driver::_NOxIndexPeriodPrv
protected
Initial value:

The time when the NOx Index sensor was last read.

◆ _VOCIndexPeriod

long WipperSnapper_I2C_Driver::_VOCIndexPeriod
protected
Initial value:
=
0L

The time period between reading the VOC Index sensor's value.

◆ _VOCIndexPeriodPrv

long WipperSnapper_I2C_Driver::_VOCIndexPeriodPrv
protected
Initial value:

The time when the VOC Index sensor was last read.

◆ _proximitySensorPeriod

long WipperSnapper_I2C_Driver::_proximitySensorPeriod
protected
Initial value:
=
0L

The time period between reading the proximity sensor's value.

◆ _proximitySensorPeriodPrv

long WipperSnapper_I2C_Driver::_proximitySensorPeriodPrv
protected
Initial value:

The time when the proximity sensor was last read.


The documentation for this class was generated from the following file: