Skip to content

A tiny helper library to wrap dependencies and provide a one liner to load json config files

License

Notifications You must be signed in to change notification settings

ESP32Home/ConfigUtils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConfigUtils

A tiny helper library to wrap dependencies and provide a one liner to load json config files

Code example

#include <Arduino.h>
#include <ArduinoJson.h>

#include <ConfigUtils.h>

DynamicJsonDocument config(5*1024);//5 KB

void setup() {

    Serial.begin(115200);

    //required 'data' folder with 'config.json'
    //flash the file system with the platformio command :
    //>pio run -t uploadfs
    load_json(config,"/config.json");
    //now you can configure any component with json
    //below just a pretty print
    serializeJsonPretty(config, Serial);
}

void loop() {
  delay(10000);
}

About

A tiny helper library to wrap dependencies and provide a one liner to load json config files

Resources

License

Stars

Watchers

Forks

Packages

No packages published