Giter Site home page Giter Site logo

esp8266sdupdater's Introduction

ESP8266SDUpdater

This is the ESP8266 Prequel to the M5Stack-SD-Updater.

ESP8266Updater is an Arduino library to package you apps on a SD card and load them from different contexts such as a menu app or MQTT message.

Minimal Requirements

  • ESP8266 (4M and more)
  • Micro SD Card reader

Usage

Put this as early as possible in your sketch:

#include "ESP8266SDUpdater.h"
SDUpdater sdUpdater;

Use this from anywhere in your code to trigger the update:

if(digitalRead(BUTTON_A_PIN) == 0) {
  Serial.println("Will Load menu binary");
  sdUpdater.updateFromSD(); // defaults to "MENU.BIN"
  ESP.restart();
}

Also works with filenames:

sdUpdater.updateFromSD("/BATMAN.BIN");
ESP.restart(); // don't forget to restart!

The OLEDiFOO example should have its binary renamed to MENU.BIN and copied onto the SD Card.

This will be addressed if practical uses are found for the OLEDiESP build, but other menus should be added for other platforms such as OLEDiCADE, Espresso Lite or Lameboy.

Troubleshooting

Using this library will create issues in your existing code. This is caused by SPIFFS and SD fighting for the legitimacy of FS namespace. ESP8266SDUpdater needs to use both, and this comes with a treat.





Compiler error: #error Architecture or board not supported

    In file included from ~/Arduino/libraries/SD/src/utility/Sd2Card.h:26:0,
        from ~/Arduino/libraries/SD/src/utility/SdFat.h:29,
        from ~/Arduino/libraries/SD/src/SD.h:20,
        from ~/Arduino/libraries/ESP8266SDUpdater/ESP8266SDUpdater.h:61,
        from ~/MySketch/MySketch.ino:xx:~/Arduino/libraries/SD/src/utility/Sd2PinMap.h:510:2: error: #error Architecture or board not supported.
        #error Architecture or board not supported.
  • Make sure you include the ESP8266SDUpdater.h library first. If you can't, make sure you insert #define FS_NO_GLOBALS before every #include "FS.h".

  • Downgrade the SD library to version 1.1.1

  • If you still get the dreadful #error Architecture or board not supported:

    • Double check with the compile logs where it says:
        Multiple libraries were found for "SD.h"
          Used: ~/Arduino/libraries/SD
          Not used: ~/Arduino/packages/esp8266/hardware/esp8266/2.3.0/libraries/SD
    
    • Copy the path to the offending SD library folder from the error message.
      In the error message example the path is ~/Arduino/libraries/SD/ but the path may vary depending on the user prefs.
      If you only see one path, and it's leading to the esp8266 folder, don't follow the next step and open an issue.

    • Delete the folder rm -Rf ~/Arduino/libraries/SD/. By doing this, the sdk will use the built-in ESP8266 SD library instead of the updated version.

Don't worry, you can still get the other SD.h back by performing a simple update check through the library manager.





Compiler error: error XXXX was not declared in this scope for one of the following objects:

FS, File, Dir, SeekMode, SeekSet, SeekCur, SeekEnd, FSInfo

  • Solution: prefix all FS object calls with fs:: (i.e. FS => fs::FS, File => fs::File, FSInfo => fs::FSInfo) until no further error is found.

Credits

esp8266sdupdater's People

Contributors

per1234 avatar tobozo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.