Skip to content
Snippets Groups Projects
SHT85.hpp 1014 B
Newer Older
//
// Created by zoe on 11/4/22.
//

#ifndef ESPCAM_SHT85_HPP
#define ESPCAM_SHT85_HPP

#include "../espnow/Message.hpp"
#include "../time/Time.hpp"
#include "Measurement.hpp"
#include "RTClib.h"    // adafruit/RTClib @^2.1.1
#include "SHTSensor.h" // sensirion/arduino-sht@^1.2.2
#include "SPI.h"
// Pin definitions for I2C (SHT85, RTC)
//  This is different from the pins on the ESP32-C3-DevKit boards!
struct outDataSht85 {
  Measurement temperature;
  Measurement humidity;
class SHT85 : public ForteSensor<outDataSht85> {
  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};