mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 20:09:14 +03:00
Support logging of any sensor and charts
This commit is contained in:
38
FS.ino
Normal file
38
FS.ino
Normal file
@@ -0,0 +1,38 @@
|
||||
void File_system_init() {
|
||||
|
||||
Serial.begin(115200);
|
||||
//Serial.setDebugOutput(true);
|
||||
Serial.println("--------------started----------------");
|
||||
//--------------------------------------------------------------
|
||||
SPIFFS.begin();
|
||||
configSetup = readFile("config.json", 4096);
|
||||
configSetup.replace(" ", "");
|
||||
configSetup.replace("\r\n", "");
|
||||
Serial.println(configSetup);
|
||||
jsonWriteStr(configJson, "SSDP", jsonRead(configSetup, "SSDP"));
|
||||
jsonWriteStr(configJson, "lang", jsonRead(configSetup, "lang"));
|
||||
|
||||
|
||||
#ifdef ESP32
|
||||
uint32_t chipID_u = ESP.getEfuseMac();
|
||||
chipID = String(chipID_u);
|
||||
jsonWriteStr(configSetup, "chipID", chipID);
|
||||
#endif
|
||||
|
||||
#ifdef ESP8266
|
||||
chipID = String( ESP.getChipId() ) + "-" + String(ESP.getFlashChipId());
|
||||
jsonWriteStr(configSetup, "chipID", chipID);
|
||||
Serial.setDebugOutput(0);
|
||||
#endif
|
||||
|
||||
jsonWriteStr(configSetup, "firmware_version", firmware_version);
|
||||
|
||||
prex = jsonRead(configSetup, "mqttPrefix") + "/" + chipID;
|
||||
Serial.println(chipID);
|
||||
|
||||
}
|
||||
|
||||
void get_esp_info() {
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user