ASCEND Flight Software
Loading...
Searching...
No Matches
SHTC3Sensor.h
Go to the documentation of this file.
1#ifndef SHTC3SENSOR_H
2#define SHTC3SENSOR_H
3
4#include "Adafruit_SHTC3.h"
5#include "PayloadConfig.h"
6#include "Sensor.h"
7
12class SHTC3Sensor : public Sensor {
13 private:
14 Adafruit_SHTC3 shtc3;
17
18 public:
20 SHTC3Sensor(unsigned long minimum_period, TwoWire* i2c_bus = &Wire);
21 bool verify() override;
22 String readData() override;
23
24 void readDataPacket(uint8_t*& packet) override;
25 String decodeToCSV(uint8_t*& packet) override;
26
27 float getRelHum();
28};
29
30#endif
Central location for pinout and config defines.
int attempt_number
Definition Device.h:19
Implementation of a Sensor for the SHTC3.
Definition SHTC3Sensor.h:12
float relative_humidity
Definition SHTC3Sensor.h:15
Adafruit_SHTC3 shtc3
Definition SHTC3Sensor.h:14
void readDataPacket(uint8_t *&packet) override
Copies data to the packet.
Definition SHTC3Sensor.cpp:53
bool verify() override
Returns if sensor is connected and working.
Definition SHTC3Sensor.cpp:28
String decodeToCSV(uint8_t *&packet) override
Decodes data from the packet.
Definition SHTC3Sensor.cpp:73
String readData() override
Reads temperature in Celcius and relative humidity in % from SHTC3.
Definition SHTC3Sensor.cpp:38
float getRelHum()
Getter for relative humidity.
Definition SHTC3Sensor.cpp:91
TwoWire * i2c_bus
Definition SHTC3Sensor.h:16
Parent class for sensor objects.
Definition Sensor.h:13
unsigned long minimum_period
Definition Sensor.h:15