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

Issue with SPIFFS storage instructions (version 0.6) #2

Open
candideu opened this issue Dec 3, 2023 · 3 comments
Open

Issue with SPIFFS storage instructions (version 0.6) #2

candideu opened this issue Dec 3, 2023 · 3 comments

Comments

@candideu
Copy link

candideu commented Dec 3, 2023

Thank you so much for creating this Zine! I can't remember how I stumbled upon it, but I went ahead and bought the Wemos D1 mini as soon as I found the zine. 😄

Last week, I finally tested it out and followed the instructions, but ran into issues with "Captive portal approach 2: Use SPIFFS storage" (page 25 of the screen zine PDF). After downloading the plugin (v. 0.5.0), unzipping the file, and moving the "ESP8266FS" folder to the [Sketchbook location]/tools/ directory, I was unable to locate the "ESP8266 Sketch Data Upload" plugin in the Arduino IDE Tools menu.

After doing some digging, it looks like the issue has been reported in the plugin's repo:

According to another user, the plugin only works with Arduino IDE version 1.8.5 or older.

Another user says the following:

this is the upstream issue: arduino/arduino-ide#58

tl;dr

* plugin framework has completely changed. vscode integration improves, java plugins are not grandfathered in.

* all old gui integrated tools aren't working, but expressif will help fix it

* spiffs is deprecated, too, one ought to use one of the two newer libraries (littlefs and fat)

* there is a littlefs plugin https://github.com/earlephilhower/arduino-esp8266littlefs-plugin which also has a gui for arduino >=2. It could be a starting point.

It looks like https://github.com/earlephilhower/arduino-littlefs-upload may be a starting point for a replacement, but I'm not the most well-versed with microcontrollers, and wanted to know if your team was aware of the issue and had other solutions (besides using an older version of the IDE).

I'll try the littlefs plugin to see if it works and report back...

@candideu
Copy link
Author

candideu commented Dec 3, 2023

I went back to the zine, and realized that it specifies using version 1.8.x of Arduino on page 5... 🤦 That's my bad!

In terms of using https://github.com/earlephilhower/arduino-littlefs-upload on version 2.2.1 of Arduino: it doesn't look like it works as an alternative. I got an endless redirection page:

image

I'll keep this issue open in case there are other ideas and solutions...

@candideu
Copy link
Author

candideu commented Dec 4, 2023

Okay, after lots of searching around and testing, I think I found a solution for the Arduino IDE version 2.2.1 or higher!! 🎉🎉

Here are the instructions for pages 25 - 28 of the zine (screen version):

Install the LittleFS uploader plugin

Go to the Arduino IDE plugins folder:

  • Windows: C:\Users\<username>\.arduinoIDE\plugins\
  • MacOS and Linux: ~/.arduinoIDE/plugins/

You may need to create the "plugins" folder.

Next, download the vsix file to the "plugins" folder on your PC: https://github.com/earlephilhower/arduino-littlefs-upload/releases

image

Restart the Arduino IDE.

Convert the .ino Arduino sketch file from SPIFFS to LittleFS

If you're using code that uses SPIFFS, you'll need to replace all mentions of SPIFFS in the .ino file with LittleFS (see this commit diff for an example of how I changed "Free Reading Wifi" project: pocket-portal@b86479b)

image

Here's the converted/ported "Free Reading Wifi" file: https://github.com/candideu/pocket-wifi-portal-LittleFS/blob/main/04_Captive_portal_approach_2/Free_Reading_Wifi/Free_Reading_Wifi.ino

Upload files with plugin

Place your project folder in your Sketchbook, as outlined in page 26 of the zine (screen version).

Open the .ino file. In the Arduino IDE, hit [Ctrl] + [Shift] + [P] (Windows) or [⌘] + [Shift] + [P] (macOS), then type "Upload LittleFS to Pico/ESP8266". Select the option.

image

When the upload is finished, you'll see the message LittleFS upload completed! beneath the code editor.

image

Click the Upload button in the top left to compile and upload the project code to the Wemos D1 mini.

image

When the upload is done, you'll see Done uploading beneath the code editor.

image

@kabumos
Copy link

kabumos commented Jan 18, 2024

Okay, after lots of searching around and testing, I think I found a solution for the Arduino IDE version 2.2.1 or higher!! 🎉🎉

Here are the instructions for pages 25 - 28 of the zine (screen version):

Install the LittleFS uploader plugin

Go to the Arduino IDE plugins folder:

  • Windows: C:\Users\<username>\.arduinoIDE\plugins\
  • MacOS and Linux: ~/.arduinoIDE/plugins/

You may need to create the "plugins" folder.

Next, download the vsix file to the "plugins" folder on your PC: https://github.com/earlephilhower/arduino-littlefs-upload/releases

image

Restart the Arduino IDE.

Convert the .ino Arduino sketch file from SPIFFS to LittleFS

If you're using code that uses SPIFFS, you'll need to replace all mentions of SPIFFS in the .ino file with LittleFS (see this commit diff for an example of how I changed "Free Reading Wifi" project: candideu@b86479b)

image

Here's the converted/ported "Free Reading Wifi" file: https://github.com/candideu/pocket-wifi-portal-LittleFS/blob/main/04_Captive_portal_approach_2/Free_Reading_Wifi/Free_Reading_Wifi.ino

Upload files with plugin

Place your project folder in your Sketchbook, as outlined in page 26 of the zine (screen version).

Open the .ino file. In the Arduino IDE, hit [Ctrl] + [Shift] + [P] (Windows) or [⌘] + [Shift] + [P] (macOS), then type "Upload LittleFS to Pico/ESP8266". Select the option.

image

When the upload is finished, you'll see the message LittleFS upload completed! beneath the code editor.

image

Click the Upload button in the top left to compile and upload the project code to the Wemos D1 mini.

image

When the upload is done, you'll see Done uploading beneath the code editor.

image

You are using littleFs to upload the files. It doesn't soluction the bug that SPIFFS can't upload. While LittleFS is different with SPIFFS. Here you will know the different. SPIFFS use less space. However LittleFS is faster.

@candideu candideu changed the title Issue with SPIFFs storage instructions (version 0.6) Issue with SPIFFS storage instructions (version 0.6) May 6, 2024
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