ASCEND Flight Software
Loading...
Searching...
No Matches
BMP390Sensor.h
Go to the documentation of this file.
1#ifndef BMP384_SENSOR_H
2#define BMP384_SENSOR_H
3
4#include <Wire.h>
5
6#include "Adafruit_BMP3XX.h"
7#include "Sensor.h"
8
13class BMP390Sensor : public Sensor {
14 private:
15 Adafruit_BMP3XX bmp;
16 TwoWire* i2c_bus;
17
18 public:
19 BMP390Sensor(TwoWire* i2c_bus = &Wire);
20 BMP390Sensor(unsigned long minium_period, TwoWire* i2c_bus = &Wire);
21
22 bool verify() override;
23 String readData() override;
24 void readDataPacket(uint8_t*& packet) override;
25 String decodeToCSV(uint8_t*& packet) override;
26};
27
28#endif // BMP384_SENSOR_H
Implementation of a Sensor for BMP384 Pressure and Temperature sensor.
Definition BMP390Sensor.h:13
TwoWire * i2c_bus
Definition BMP390Sensor.h:16
bool verify() override
Tests if the sensor is can be reached on I2C, sets up oversampling and filter configuration.
Definition BMP390Sensor.cpp:31
void readDataPacket(uint8_t *&packet) override
Copies data to the packet.
Definition BMP390Sensor.cpp:63
String decodeToCSV(uint8_t *&packet) override
Decodes data from the packet.
Definition BMP390Sensor.cpp:95
String readData() override
Reads data to a csv stub.
Definition BMP390Sensor.cpp:49
Adafruit_BMP3XX bmp
Definition BMP390Sensor.h:15
Parent class for sensor objects.
Definition Sensor.h:13