14 #ifndef ADAFRUIT_DPS310_H 15 #define ADAFRUIT_DPS310_H 17 #include <Adafruit_BusIO_Register.h> 18 #include <Adafruit_I2CDevice.h> 19 #include <Adafruit_SPIDevice.h> 20 #include <Adafruit_Sensor.h> 26 #define DPS310_I2CADDR_DEFAULT (0x77) 29 #define DPS310_PRSB2 0x00 30 #define DPS310_TMPB2 0x03 31 #define DPS310_PRSCFG 0x06 32 #define DPS310_TMPCFG 0x07 33 #define DPS310_MEASCFG 0x08 34 #define DPS310_CFGREG 0x09 35 #define DPS310_RESET 0x0C 36 #define DPS310_PRODREVID 0x0D 37 #define DPS310_TMPCOEFSRCE 0x28 109 TwoWire *wire = &Wire);
110 bool begin_SPI(uint8_t cs_pin, SPIClass *theSPI = &SPI);
111 bool begin_SPI(int8_t cs_pin, int8_t sck_pin, int8_t miso_pin,
120 bool pressureAvailable(
void);
121 bool temperatureAvailable(
void);
123 float readAltitude(
float seaLevelhPa = 1013.25);
125 Adafruit_Sensor *getTemperatureSensor(
void);
126 Adafruit_Sensor *getPressureSensor(
void);
128 bool getEvents(sensors_event_t *temp_event, sensors_event_t *pressure_event);
132 void _readCalibration(
void);
135 int16_t _c0, _c1, _c01, _c11, _c20, _c21, _c30;
138 int32_t raw_pressure, raw_temperature;
139 float _temperature, _scaled_rawtemp, _pressure;
140 int32_t temp_scale, pressure_scale;
142 Adafruit_I2CDevice *i2c_dev = NULL;
143 Adafruit_SPIDevice *spi_dev = NULL;
dps310_rate_t
Definition: Adafruit_DPS310.h:39
4 Hz
Definition: Adafruit_DPS310.h:54
dps310_oversample_t
Definition: Adafruit_DPS310.h:51
void getSensor(sensor_t *)
Gets the sensor_t data for the DPS310's temperature sensor.
Definition: Adafruit_DPS310.cpp:472
4 Hz
Definition: Adafruit_DPS310.h:42
Continuous pressure measurements.
Definition: Adafruit_DPS310.h:67
Definition: Adafruit_DPS310.h:75
32 Hz
Definition: Adafruit_DPS310.h:45
16 Hz
Definition: Adafruit_DPS310.h:44
2 Hz
Definition: Adafruit_DPS310.h:53
Adafruit_DPS310_Pressure(Adafruit_DPS310 *parent)
Create an Adafruit_Sensor compatible object for the pressure sensor.
Definition: Adafruit_DPS310.h:93
#define DPS310_I2CADDR_DEFAULT
Default breakout addres.
Definition: Adafruit_DPS310.h:26
64 Hz
Definition: Adafruit_DPS310.h:58
Continuous temp+pressure measurements.
Definition: Adafruit_DPS310.h:69
bool getEvent(sensors_event_t *)
Gets the temperature as a standard sensor event.
Definition: Adafruit_DPS310.cpp:495
Stopped/idle.
Definition: Adafruit_DPS310.h:64
Continuous pressure measurements.
Definition: Adafruit_DPS310.h:68
Adafruit_DPS310_Temp(Adafruit_DPS310 *parent)
Create an Adafruit_Sensor compatible object for the temp sensor.
Definition: Adafruit_DPS310.h:79
1 Hz
Definition: Adafruit_DPS310.h:52
8 Hz
Definition: Adafruit_DPS310.h:55
1 Hz
Definition: Adafruit_DPS310.h:40
dps310_mode_t
Definition: Adafruit_DPS310.h:63
Take single temperature measurement.
Definition: Adafruit_DPS310.h:66
2 Hz
Definition: Adafruit_DPS310.h:41
64 Hz
Definition: Adafruit_DPS310.h:46
32 Hz
Definition: Adafruit_DPS310.h:57
Definition: Adafruit_DPS310.h:89
Take single pressure measurement.
Definition: Adafruit_DPS310.h:65
128 Hz
Definition: Adafruit_DPS310.h:59
Definition: Adafruit_DPS310.h:103
128 Hz
Definition: Adafruit_DPS310.h:47
16 Hz
Definition: Adafruit_DPS310.h:56
8 Hz
Definition: Adafruit_DPS310.h:43