ESP32 / ESP8266 & BME280 / SHT2x sensor with InfluxDB support
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

sensors.h 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * sensors.h
  3. *
  4. * ESP8266 / ESP32 Environmental Sensor
  5. *
  6. * ----------------------------------------------------------------------------
  7. * "THE BEER-WARE LICENSE" (Revision 42):
  8. * <xythobuz@xythobuz.de> wrote this file. As long as you retain this notice
  9. * you can do whatever you want with this stuff. If we meet some day, and you
  10. * think this stuff is worth it, you can buy me a beer in return. Thomas Buck
  11. * ----------------------------------------------------------------------------
  12. */
  13. #ifndef __SENSORS_H__
  14. #define __SENSORS_H__
  15. float sht_temp(void);
  16. float sht_humid(void);
  17. extern bool found_sht;
  18. #ifdef ENABLE_BME280
  19. float bme1_temp(void);
  20. float bme2_temp(void);
  21. float bme1_humid(void);
  22. float bme2_humid(void);
  23. float bme1_pressure(void);
  24. float bme2_pressure(void);
  25. extern bool found_bme1, found_bme2;
  26. #endif // ENABLE_BME280
  27. #ifdef ENABLE_CCS811
  28. float ccs1_eco2(void);
  29. float ccs1_tvoc(void);
  30. float ccs2_eco2(void);
  31. float ccs2_tvoc(void);
  32. extern bool found_ccs1, found_ccs2;
  33. extern bool ccs1_data_valid, ccs2_data_valid;
  34. extern int ccs1_error_code, ccs2_error_code;
  35. #endif // ENABLE_CCS811
  36. void handleCalibrate();
  37. void initSensors();
  38. void runSensors();
  39. #endif // __SENSORS_H__