Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTCTimeStampTest does not compile with ESP8266WiFi.h included #48

Open
Primus007 opened this issue May 18, 2020 · 4 comments
Open

RTCTimeStampTest does not compile with ESP8266WiFi.h included #48

Primus007 opened this issue May 18, 2020 · 4 comments

Comments

@Primus007
Copy link

Primus007 commented May 18, 2020

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?

@greiman
Copy link
Owner

greiman commented May 19, 2020

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.

@Primus007
Copy link
Author

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

@greiman
Copy link
Owner

greiman commented May 19, 2020

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

@Primus007
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants