yurilopes / spiffsinifile Goto Github PK
View Code? Open in Web Editor NEWESP8226 and ESP32 library to parse ini files
License: GNU General Public License v3.0
ESP8226 and ESP32 library to parse ini files
License: GNU General Public License v3.0
Problem:
Compilation error on SPIFFSIniFile.h library, see following error message from the Arduino IDE compiler
In file included from C:\Users\rj\Documents\Arduino\libraries\SPIFFSIniFile\src\SPIFFSIniFile.cpp:1:0:
C:\Users\rj\Documents\Arduino\libraries\SPIFFSIniFile\src\SPIFFSIniFile.h: In member function 'bool SPIFFSIniFile::open()':
C:\Users\rj\Documents\Arduino\libraries\SPIFFSIniFile\src\SPIFFSIniFile.h:130:10: error: 'SPIFFS' was not declared in this scope
_file = SPIFFS.open(_filename, _mode);
^
The inclusion of the SPIFFS.h file is needed for using one of its functions in line 130: _file = SPIFFS.open(_filename, _mode);
Solution:
manually add one line for including SPIFFS.h library in the SPIFFSIniFile library
search following library source code file:
\SPIFFSIniFile-1.0.0\src\SPIFFSIniFile.h
open in text editor
insert: #include "SPIFFS.h" after line 9 #include "FS.h" as follows:
use line 9 and following in SPIFFSIniFile.h like this:
#include "FS.h"
#include "SPIFFS.h" // additional line inserted for including missing SPIFFS library
#include "IPAddress.h"
instead of original line 9 and 10 in SPIFFSIniFile.h:
#include "FS.h"
#include "IPAddress.h"
Hello Yuri,
Would mind investing 30 to 45 minutes into some basic documentation?
Your demofile uses FS.h. Fpr using SPIFFS there is the library SPIFFS.h
Are they compatible with each other?
There is a small note inside the example
"Remeber to upload the data directory to your board!"
Does this mean that the library SPIFFS-Ini has a hardcoded filepath "\data" ??
How would I create a subfolder?
if yes why would you do that? IMHO it is up to the user to take care if he is accidently formatting his SPIFFS or not
Do you happen to know another example that does the following things additionally?
best regards
Stefan
I use the available files. Its telling me that the file exists but it 'ini file /net.ini not valid: seek error'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.