jasoncoon / esp8266-fastled-webserver

GNU General Public License v3.0
714 stars 359 forks source link

Sounds great, doesn't work #248

Open rmpel opened 2 years ago

rmpel commented 2 years ago

The suggested LittleFS library does not work, first its LITTLEFS.h (capitals) instead of LittleFS.h or it failed the include before doing anything else. Then vfs_api.h can't be found. I tried a number of different LittleFS libraries, all produce the same error.

I like the project, I would love to see it fixed, or -- if there's nothing to fix -- a copy of a working set of libraries. Until then, I'm moving on to the next project.

jasoncoon commented 2 years ago

Builds fine in both Arduino (1.8.19) and PlatformIO, both locally and in GitHub Actions CI/CD: https://github.com/jasoncoon/esp8266-fastled-webserver/actions/runs/1890217588

When building in Arduino locally, it looks like it's using the LittleFS library built in to the ESP8266 core:

Using library LittleFS at version 0.1.0 in folder: ~/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/LittleFS

The lolrol LittleFS library is apparently only used by PlatformIO when building for ESP32, which is not yet actually supported yet anyway. There is a note in the readme, but it could definitely be made more clear.

This is an open source project. I made it for my own use but shared it in case others might find it useful. Feel free to move on to the next project, no worries. Or, if you feel like it, submit a pull request or friendly feedback with suggested changes.

rmpel commented 2 years ago

Hi Jason

Sorry

My apologies

My message sounds really harsh, disrespectful even, but that was totally not my intention! But, ... nonetheless, ...; sorry.

I am very happy it works for you, I am just frustrated it doesn't for me, even with hours (!! missed lunch and diner) of trying and googling. The main problem is the lack of proper package management in Arduino.

When building a different project, I need to set different versions through the library manager, instead of the project having a list that says 'this project needs this library in that version fetched from such external url'. Composer can do it for PHP projects, node has package.json, why doesn't Arduino have something like that? Or am I THAT a total n00b and just don't know how?

Should I be using a different IDE?

jasoncoon commented 2 years ago

No worries, I usually try to assume that something was miscommunicated or lost in translation. 🙂

Arduino dependency management can definitely be frustrating. If you haven't already, I would definitely recommend checking out PlatformIO, which does provide versioned dependency management. @henrygab did a fantastic job getting this sketch working in both Arduino and PlatformIO, and documented the initial setup and build process here: https://github.com/jasoncoon/esp8266-fastled-webserver/discussions/207#discussioncomment-1655195

Here are excerpts from the compiler output from Arduino that shows the board and library versions I have:

Using board 'd1_mini' from platform in folder: ~/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2
Using core 'esp8266' from platform in folder: ~/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2
...
Using library ArduinoJson at version 6.18.5 in folder: ~/Documents/Arduino/libraries/ArduinoJson 
Using library FastLED at version 3.5.0 in folder: ~/Documents/Arduino/libraries/FastLED 
Using library LittleFS at version 0.1.0 in folder: ~/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/LittleFS 
Using library NTPClient at version 3.2.0 in folder: ~/Documents/Arduino/libraries/NTPClient 
Using library ESP8266WiFi at version 1.0 in folder: ~/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi 
Using library ESP8266mDNS at version 1.2 in folder: ~/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266mDNS 
Using library ESP8266WebServer at version 1.0 in folder: ~/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WebServer 
Using library ESP8266HTTPUpdateServer at version 1.0 in folder: ~/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266HTTPUpdateServer 
Using library ESP8266HTTPClient at version 1.2 in folder: ~/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266HTTPClient 
Using library EEPROM at version 1.0 in folder: ~/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/EEPROM 
Using library WiFiManager at version 2.0.4-beta in folder: ~/Documents/Arduino/libraries/WiFiManager 
Using library DNSServer at version 1.1.1 in folder: ~/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/DNSServer 
henrygab commented 2 years ago

Should I be using a different IDE?

@rmpel, the short answer is YES, because you know what an IDE is.

PlatformIO (PIO) is command-line at its core, allowing you to use your favorite IDE to edit. Many people choose to use Visual Studio Code (the free editor), as the PIO plug-in provides powerful editing, debugging, and most importantly ... package management.

Thus, if you need v1 of a library for one project, and v2 of that same library for a second project, PIO can work for you.

VSCode + PIO Plugin == Intellisense ... tab completion, jump-to-definition, jump-to-caller, and other popular editing features.