greiman / SdFat-beta

Beta SdFat for test of new features

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RTCTimeStampTest does not compile with ESP8266WiFi.h included

Primus007 opened this issue · comments

Using Arduino IDE.

The Sample RTCTimeStampTest (and some others examples also) does not compile with ESP8266WiFi.h included

#include <ESP8266WiFi.h>

if (!file.open("RtcTest.txt", FILE_WRITE)) {
exit status 1
'class fs::File' has no member named 'open'

How can i fix it?

Looks like there is a conflict for the class File in esp8266 core.


C:\Users\bill\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.2\cores\esp8266/FS.h:52:7: note: previous declaration 'class fs::File'

 class File : public Stream

Guess you can't use SdFat with #include <ESP8266WiFi.h>.

Use the esp8266 SD.h package, it defines open for esp8266.

Looks like I need to drop support for ESP.

There is a very old version of SdFat in esp8266 and esp8266 will use that version.

esp8266 SD.h does not support timestamp.
It is very difficult to find a good library that supports timestamp for files and runs with ESP8266WiFi.h

The SdFat timestamp code in in esp8266 core but I don't see how a user can access it.

Here is the location of the version of SdFat used in ESP8266 SD.h:

/esp8266/hardware/esp8266/2.7.1/libraries/ESP8266SdFat

it should work with: SdFile::dateTimeCallback(dateTime);
There is an example scetch "Timestamp"
I have not tested it.