There are more detailed uses of these routines in the repo.....
Hope this helps....
https://github.com/EnvironmentMonitor/ESP8266-DHT11-WiFi_Sensor/blob/master/ThingSpeak_Email_log.ino
Explore... Chat... Share...
Moderator: igrr
/* SearchSPIFFS.ino 6 May 2017
SPIFFS plain text file has 100 lines, each line approx 1kb
After reading 30 lines (30kb) in less than 2 seconds it takes several seconds PER line
*/
#include "FS.h"
String line;
unsigned int lineNumber;
unsigned int line2Find = 32;
File MyFile = SPIFFS.open("SomeData.txt", "r");
void test(){
while(MyFile.available()) { // we could open the file, so loop through it to find the record we require
lineNumber++;
Serial.println(lineNumber); // show line number of SPIFFS file
line = MyFile.readStringUntil('\n'); // Read line by line from the file
if(lineNumber == line2Find){
Serial.println(F("Found record"));
break; // exit while loop once record is found
}
}
}
void setup() {
Serial.begin(115200);
Serial.println(F("\nStarted"));
test(); // find line 32 of plain text SPIFFS file
}
void loop() {
yield();
}
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]