You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 27, 2023. It is now read-only.
Please describe your use case for this integration and alternatives you've tried:
I'm trying to use an SD card to store scripts for addressable LED animations.
At the moment, the Arduino SD library can't be used with esphomelib because it conflicts with the esp8266 SPIFFS library. Defining FS_NO_GLOBALS would resolve the issue. I added #define FS_NO_GLOBALS to my project and I'm able to compile with SD.h included. Everything in my project seems to be working correctly.
It'd be nice to have at least the define added officially. But what are your thoughts on having a proper SD component?
Additional context:
ESPAsyncWebServer uses the esp8266 SPIFFS library (FS.h). However, both FS and the Arduino SD library (SD.h) define a File class, so they can't coexist by default. see esp8266/Arduino#1524
FS has a FS_NO_GLOBALS flag as a workaround for the namespace conflict. ESPAsyncWebServer is compatible with the flag. see me-no-dev/ESPAsyncWebServer#112
Since esphomelib uses ESPAsyncWebServer, the FS_NO_GLOBALS flag needs to be set to use the SD library. As far as I can tell, esphomelib doesn't use SPIFFS calls anywhere. So there shouldn't be a need to do anything other than adding the define to resolve the coexistence problem.
The text was updated successfully, but these errors were encountered:
What new integration would you wish to have?
SD card component for use in other components
If possible, provide a link to an existing library for the integration:
Arduino SD library (SD.h) https://github.com/arduino-libraries/SD
Please describe your use case for this integration and alternatives you've tried:
I'm trying to use an SD card to store scripts for addressable LED animations.
At the moment, the Arduino SD library can't be used with esphomelib because it conflicts with the esp8266 SPIFFS library. Defining FS_NO_GLOBALS would resolve the issue. I added
#define FS_NO_GLOBALS
to my project and I'm able to compile with SD.h included. Everything in my project seems to be working correctly.It'd be nice to have at least the define added officially. But what are your thoughts on having a proper SD component?
Additional context:
ESPAsyncWebServer uses the esp8266 SPIFFS library (FS.h). However, both FS and the Arduino SD library (SD.h) define a File class, so they can't coexist by default. see esp8266/Arduino#1524
FS has a FS_NO_GLOBALS flag as a workaround for the namespace conflict. ESPAsyncWebServer is compatible with the flag. see
me-no-dev/ESPAsyncWebServer#112
Since esphomelib uses ESPAsyncWebServer, the FS_NO_GLOBALS flag needs to be set to use the SD library. As far as I can tell, esphomelib doesn't use SPIFFS calls anywhere. So there shouldn't be a need to do anything other than adding the define to resolve the coexistence problem.
The text was updated successfully, but these errors were encountered: