ASCEND Flight Software
Loading...
Searching...
No Matches
BME680Sensor.h
Go to the documentation of this file.
1#ifndef BME680SENSOR_H
2#define BME680SENSOR_H
3
4#include <Adafruit_BME680.h>
5#include <Adafruit_Sensor.h>
6#include <SPI.h>
7#include <Wire.h>
8#include <string.h>
9
10#include "PayloadConfig.h"
11#include "Sensor.h"
12
13#define SEALEVELPRESSURE_HPA (1013.25)
14
35class BME680Sensor : public Sensor {
36 private:
37 Adafruit_BME680 bme;
38
39 public:
41 BME680Sensor(unsigned long minimum_period);
42
43 bool verify() override;
44 String readData() override;
45 void readDataPacket(uint8_t*& packet) override;
46 String decodeToCSV(uint8_t*& packet) override;
47};
48
49#endif
Central location for pinout and config defines.
A class to interface with the Adafruit BME680 sensor for environmental data collection.
Definition BME680Sensor.h:35
String readData() override
Reads sensor data and returns it in CSV format.
Definition BME680Sensor.cpp:67
String decodeToCSV(uint8_t *&packet) override
Decodes the packet data and returns it in CSV format.
Definition BME680Sensor.cpp:117
void readDataPacket(uint8_t *&packet) override
Reads sensor data and appends it to the packet byte array.
Definition BME680Sensor.cpp:87
Adafruit_BME680 bme
Definition BME680Sensor.h:37
bool verify() override
Verifies the connection and readiness of the BME680 sensor.
Definition BME680Sensor.cpp:40
BME680Sensor()
Default constructor for the BME680Sensor class.
Definition BME680Sensor.cpp:9
Parent class for sensor objects.
Definition Sensor.h:13
unsigned long minimum_period
Definition Sensor.h:15