29 lines
642 B
C++
29 lines
642 B
C++
#ifndef CSV_WRITER_H_
|
|
#define CSV_WRITER_H_
|
|
|
|
#if defined(ESP8266)
|
|
# include <LittleFS.h>
|
|
# define FS_LIB LittleFS
|
|
#elif defined(ESP32)
|
|
# include <SPIFFS.h>
|
|
# define FS_LIB SPIFFS
|
|
#else
|
|
# error Board should be either ESP8266 or ESP832
|
|
#endif
|
|
|
|
#include "config.h"
|
|
#include "util.h"
|
|
#include "led_effects.h"
|
|
|
|
namespace config {
|
|
extern uint16_t csv_interval; // [s]
|
|
}
|
|
namespace csv_writer {
|
|
extern String last_successful_write;
|
|
void initialize();
|
|
void logIfTimeHasCome(const String &timeStamp, const int16_t &co2, const float &temperature, const float &humidity);
|
|
int getAvailableSpace();
|
|
extern const String filename;
|
|
}
|
|
|
|
#endif
|