Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 623 Bytes

README.md

File metadata and controls

29 lines (22 loc) · 623 Bytes

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);
}