-
Zoe Michaela Dietmar Pfister authored
moved TEROS10 to wolle Library, added tests that check if all libraries compile and run successfully on an ESP32 where no peripherals are connected (see TestSensorLibraries.cpp)
Zoe Michaela Dietmar Pfister authoredmoved TEROS10 to wolle Library, added tests that check if all libraries compile and run successfully on an ESP32 where no peripherals are connected (see TestSensorLibraries.cpp)
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
SHT85.hpp 1.01 KiB
//
// Created by zoe on 11/4/22.
//
#ifndef ESPCAM_SHT85_HPP
#define ESPCAM_SHT85_HPP
#include "../espnow/Message.hpp"
#include "../time/Time.hpp"
#include "ForteSensor.hpp"
#include "Measurement.hpp"
#include "Pinout.hpp"
#include "RTClib.h" // adafruit/RTClib @^2.1.1
#include "SHTSensor.h" // sensirion/arduino-sht@^1.2.2
#include "SPI.h"
#include "esp_log.h"
#include <Arduino.h>
#include <Wire.h>
// Pin definitions for I2C (SHT85, RTC)
// This is different from the pins on the ESP32-C3-DevKit boards!
#define SDA 13
#define SCL 12
struct outDataSht85 {
Measurement temperature;
Measurement humidity;
};
class SHT85 : public ForteSensor<outDataSht85> {
public:
void setup() override;
outDataSht85 readData() override;
std::list<Message> buildMessages() override;
[[nodiscard]] SensorInformation getSensorInformation() const override;
private:
SHTSensor sht; // I2C address: 0x44
const SensorInformation
sensorInformation{HardwareName::SHT85, SensorProtocol::I2C};
};
#endif // ESPCAM_SHT85_HPP