{"id":25313006,"url":"https://github.com/geekbrother/config2eeprom","last_synced_at":"2026-04-09T02:31:24.077Z","repository":{"id":96155116,"uuid":"280373557","full_name":"geekbrother/config2eeprom","owner":"geekbrother","description":"PlatformIO, Arduino library to simple storing configs or arrays to EEPROM","archived":false,"fork":false,"pushed_at":"2020-09-03T14:35:07.000Z","size":24,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T19:30:12.769Z","etag":null,"topics":["arduino","eeprom","esp32","esp8266","platformio"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geekbrother.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-17T08:43:37.000Z","updated_at":"2024-05-17T16:50:39.000Z","dependencies_parsed_at":"2023-04-09T05:01:09.388Z","dependency_job_id":null,"html_url":"https://github.com/geekbrother/config2eeprom","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/geekbrother/config2eeprom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekbrother%2Fconfig2eeprom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekbrother%2Fconfig2eeprom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekbrother%2Fconfig2eeprom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekbrother%2Fconfig2eeprom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geekbrother","download_url":"https://codeload.github.com/geekbrother/config2eeprom/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekbrother%2Fconfig2eeprom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31582590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","eeprom","esp32","esp8266","platformio"],"created_at":"2025-02-13T15:35:28.018Z","updated_at":"2026-04-09T02:31:24.057Z","avatar_url":"https://github.com/geekbrother.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# config2eeprom\n\n![Build with PlatformIO](https://img.shields.io/badge/build%20with-PlatformIO-orange?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMjUwMCIgaGVpZ2h0PSIyNTAwIiB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZD0iTTEyOCAwQzkzLjgxIDAgNjEuNjY2IDEzLjMxNCAzNy40OSAzNy40OSAxMy4zMTQgNjEuNjY2IDAgOTMuODEgMCAxMjhjMCAzNC4xOSAxMy4zMTQgNjYuMzM0IDM3LjQ5IDkwLjUxQzYxLjY2NiAyNDIuNjg2IDkzLjgxIDI1NiAxM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DggMi4zNzQgMi4zNzQgMCAwIDEgMCA0Ljc0OHoiIGZpbGw9IiNGRjdGMDAiLz48L3N2Zz4=)\n\n## PlatformIO, Arduino library to store configs or arrays to EEPROM using ArduinoJSON library.\n\nConfig2EEPROM uses ArduinoJSON library to serialize data and store it in EEPROM using per byte method. Library uses MsgPack serialization method instead of JSON to minimize bytes size and increase performance.\n\nBy default maximum data size is 254 bytes, but it can be resized by `#define EEPROM_DOC_SIZE bytes_size`.\n\n## See example:\n\n```c++\n// Config2EEPROM config save and load to  EEPROM library.\n//\n// This is an example of howto save and load data\n// to and from EEPROM using Config2EEPROM library.\n// Tested with Platform.io with ESP8266.\n//\n// Author: Max Kalashnikov\n// Git Repo: https://github.com/geekbrother/config2eeprom\n\n#include \u003cArduino.h\u003e\n#include \u003cESP8266WiFi.h\u003e\n#include \u003cconfig2eeprom.hpp\u003e\n\n// Serial incoming\nString incoming;\n\n// Config class and map hash\nconfig2eeprom c2e;\n\n// =There are few overloads:\n// -You can pass starting address of eeprom instance if you need\n// config2eeprom c2e(256);\n\n// -You can pass starting address of eeprom and document size,\n// which is 254 bytes by default\n// config2eeprom c2e(256, 2000);\n\nstaticConfigDoc configHash;\n\nvoid setup()\n{\n  // Print info\n  Serial.begin(9600);\n  Serial.println(\"config2eeprom example.\");\n  Serial.println(\"Send 'S' command to save exmaple data to eeprom.\");\n  Serial.println(\"Send 'D' command to clear data from eeprom.\");\n\n  // Load config file and check is configured\n  if(!c2e.load(configHash)){\n    Serial.println(\"No config in EEPROM.\");\n  }else{\n    Serial.println(\"Config found in EEPROM.\");\n\n    const String ssid = configHash[\"wifi_ssid\"].as\u003cString\u003e();\n    const String pass = configHash[\"wifi_pass\"].as\u003cString\u003e();\n\n    // Start wifi as STA\n    Serial.println(\"Start wifi STA ssid, pass:\");\n    Serial.print( ssid );\n    Serial.print(\",\");\n    Serial.print( pass );\n    wifi.startSTA( ssid.c_str(), pass.c_str());\n  }\n}\n\nvoid loop()\n{\nif (Serial.available() \u003e 0) {\n    // read the incoming\n    incoming = Serial.readString();\n    // say what you got:\n    Serial.println(incoming);\n    // Save example data\n    if (incoming == \"S\"){\n        // initialize staticConfigDoc which is ArduinoJSON doc type\n        staticConfigDoc c2econfig;\n        // Save wifi credentials to hash\n        const char *ssid = \"MyWIFI\";\n        const char *pass = \"SomePass\";\n        c2econfig[\"wifi_ssid\"] = ssid;\n        c2econfig[\"wifi_pass\"] = pass;\n        c2e.save( c2econfig );\n        // Restart esp\n        ESP.restart();\n    }\n    // Clear eeprom\n    if (incoming == \"D\"){\n        c2e.clear();\n        ESP.restart();\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekbrother%2Fconfig2eeprom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeekbrother%2Fconfig2eeprom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekbrother%2Fconfig2eeprom/lists"}