- class Sensor
- The "Sensor" class is used for all sensor-level operations - waking, sleeping, and taking measurements.
Constructors, destructors, conversion operators
- bool setup(void ) override
- Do any one-time preparations needed before the sensor will be able to take readings.
- String getSensorLocation(void ) override
- Get the pin or connection location between the mcu and the sensor.
- bool addSingleMeasurementResult(void ) override
- Get the results from a single measurement.
MeaSpecMS5803(int8_t powerPin, uint8_t i2cAddressHex = 0x76, int16_t maxPressure = 14, uint8_t measurementsToAverage = 1) explicit
Construct a new MeaSpecMS5803 object.
The pin on the mcu controlling power to the MS5803 Use -1 if it is continuously powered.
|i2cAddressHex||The I2C address of the MS5803; must be either 0x76 or 0x77. The default value is 0x76.|
|maxPressure||The maximum pressure of the specific MS5803 in bar. The sensors are maufactured with maximum pressures of 1.1 bar, 1.3 bar, 5 bar, 7 bar, 14 bar, and 30 bar.|
|measurementsToAverage||The number of measurements to take and average before giving a "final" result from the sensor; optional with a default value of 1.|
boolsetup(void ) override
Do any one-time preparations needed before the sensor will be able to take readings.
|Returns||bool True if the setup was successful.|
This sets the pin modes for _
StringgetSensorLocation(void ) override
Get the pin or connection location between the mcu and the sensor.
|Returns||String Text describing how the sensor is attached to the mcu.|
booladdSingleMeasurementResult(void ) override
Get the results from a single measurement.
|Returns||bool True if the function completed successfully.|
This asks the sensor for a new result, verifies that it passes sanity range checks, and then adds the value to the result array.