Skip to content

The ESPFileUpdater library allows ESP32/ESP8266 devices to efficiently check and update files from a remote server. It requires an internet connection, a file system, and accurate system time to function properly. πŸŒπŸ“‚

License

Notifications You must be signed in to change notification settings

mellowpropane/ESPFileUpdater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ESPFileUpdater πŸš€

ESPFileUpdater Arduino License

Welcome to the ESPFileUpdater repository! This Arduino library allows you to easily update or download files from online sources. It is designed for use with ESP32 and ESP8266 boards, making it a versatile tool for your IoT projects.

Table of Contents

  1. Introduction
  2. Features
  3. Installation
  4. Usage
  5. Supported Platforms
  6. Examples
  7. Contributing
  8. License
  9. Links

Introduction

The ESPFileUpdater library simplifies the process of managing files on your ESP32 and ESP8266 devices. Whether you need to download configuration files or update existing ones, this library provides a straightforward approach. You can focus on building your application while the library handles file management seamlessly.

Features

  • Easy File Management: Download and update files from online sources with minimal code.
  • Supports Multiple File Systems: Works with LittleFS and SPIFFS.
  • Lightweight: Designed to have a small footprint on your device's resources.
  • Cross-Platform: Compatible with both ESP32 and ESP8266 boards.

Installation

To install the ESPFileUpdater library, follow these steps:

  1. Open the Arduino IDE.
  2. Go to Sketch > Include Library > Manage Libraries.
  3. Search for "ESPFileUpdater".
  4. Click on the install button.

Alternatively, you can download the library from this link and add it manually to your Arduino libraries folder.

Usage

Using the ESPFileUpdater library is straightforward. Here’s a simple example to get you started:

#include <ESPFileUpdater.h>

ESPFileUpdater fileUpdater;

void setup() {
  Serial.begin(115200);
  fileUpdater.begin();
  
  if (fileUpdater.downloadFile("http://example.com/file.txt")) {
    Serial.println("File downloaded successfully!");
  } else {
    Serial.println("Failed to download file.");
  }
}

void loop() {
  // Your code here
}

This code initializes the library and attempts to download a file from a specified URL. Make sure to replace the URL with your actual file location.

Supported Platforms

The ESPFileUpdater library supports the following platforms:

  • ESP32
  • ESP8266

You can use this library in your projects with any of these boards.

Examples

Here are some example scenarios where you might use the ESPFileUpdater library:

Updating Configuration Files

You can host your configuration files online and use this library to update them automatically. This is useful for applications that require frequent updates without needing physical access to the device.

Downloading Assets

If your project requires assets like images or scripts, you can download them on-the-fly. This allows for dynamic content updates and improved user experiences.

Backup and Restore

You can implement backup features by downloading important files to your device and later restoring them when needed.

Contributing

We welcome contributions to the ESPFileUpdater library! If you would like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Make your changes and commit them (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a pull request.

Your contributions help improve the library and benefit the community!

License

This project is licensed under the MIT License. See the LICENSE file for details.

Links

For more information, visit the Releases section. You can find the latest updates and download the library from there.

GitHub

Feel free to reach out if you have any questions or need support. Happy coding!

About

The ESPFileUpdater library allows ESP32/ESP8266 devices to efficiently check and update files from a remote server. It requires an internet connection, a file system, and accurate system time to function properly. πŸŒπŸ“‚

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages