{"id":20726654,"url":"https://github.com/embeddedartistry/athenaeeprom","last_synced_at":"2026-04-20T12:34:20.728Z","repository":{"id":84101206,"uuid":"259766802","full_name":"embeddedartistry/AthenaEEPROM","owner":"embeddedartistry","description":"EEPROM Library for Use with the Athena Bootloader","archived":false,"fork":false,"pushed_at":"2020-09-18T23:11:29.000Z","size":47,"stargazers_count":0,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T09:20:14.647Z","etag":null,"topics":["arduino","athena-bootloader","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/embeddedartistry.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-04-28T22:34:31.000Z","updated_at":"2020-10-03T19:56:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"29f4e0c6-6f53-4b0e-a006-1ecbffe8d145","html_url":"https://github.com/embeddedartistry/AthenaEEPROM","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/embeddedartistry/AthenaEEPROM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embeddedartistry%2FAthenaEEPROM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embeddedartistry%2FAthenaEEPROM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embeddedartistry%2FAthenaEEPROM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embeddedartistry%2FAthenaEEPROM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/embeddedartistry","download_url":"https://codeload.github.com/embeddedartistry/AthenaEEPROM/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embeddedartistry%2FAthenaEEPROM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32047337,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","athena-bootloader","hacktoberfest"],"created_at":"2024-11-17T04:26:31.635Z","updated_at":"2026-04-20T12:34:20.709Z","avatar_url":"https://github.com/embeddedartistry.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Athena-Aware EEPROM Library\n\nThis library is meant for Arduino application using the Athena bootloader and storing data in the Arduino EEPROM.\n\nThe Athena bootloader requires space in the EEPROM. Devices which are also using the EEPROM can use the AthenaEEPROM library instead of the built-in EEPROM library. AthenaEEPROM will automatically handle offsets for Athena data, meaning that you do not need to adjust EEPROM offsets in your program.\n\nIf you are using the default EEPROM library for our own purposes, you **must** start writing after `NETEEPROM_END`, available in `AthenaEEPROM_defs.h`:\n\nNote that use of the Athena bootloader does reduce the maximum available EEPROM capacity for the application by `NETEEPROM_END-1` bytes.\n\nIn addition to reading and writing data from the EEPROM, this library also enables you to read/write network settings using the Arduino EEPROM. These network settings are used by the Athena bootloader and AthenaEthernetReset library.\n\nYou must program the device with the proper network settings in order for the Athena bootloader and AthenaEthernetReset library to properly function.\n\n## Converting to the Library\n\nTo use the library, include `AthenaEEPROM.h` instead of `EEPROM.h`:\n\n```\n#include \u003cAthenaEEPROM.h\u003e\n```\n\nThe library provides a global instance called `EEPROM` that serves as a drop-in replacement for the standard `EEPROM` object provided by `EEPROM.h`.\n\nThe standard interfaces still work. You can write a byte with the `write` API:\n\n```\nEEPROM.write(addr, val);\n```\n\nAnd read a byte using the `read` API:\n\n```\nbyte value = EEPROM.read(address);\n```\n\nThis library automatically handles the offset that protects Athena-specific EEPROM data. The actual size of the EEPROM available to your program is reduced by `NETEEPROM_OFFSET` bytes, defined in `AthenaEEPROM.h`.\n\nFor more information on migrating an existing application that uses the EEPROM, see the [migration guide](docs/eeprom_migration_guide.md).\n\n## EEPROM Memory Requirements\n\nThis library uses the Arduino EEPROM to store values needed by the bootloader and AthenaEthernetReset server. If you are using the default EEPROM library for our own purposes, please make sure to start writing after `NETEEPROM_END`, available in `AthenaEEPROM_defs.h`.\n\nIf you use the AthenaEEPROM library included with the Athena bootloader, then offsets will be handled for you automatically.\n\n## Using the AthenaEEPROM Library\n\nA global instance is declared by the library and should be referenced within your application:\n\n```\nAthenaEEPROMClass AthenaEEPROM;\n```\n\nThe current settings can be printed out to serial:\n\n```\nAthenaEEPROM.printAll(\u0026Serial);\n```\n\nTo update network settings, use the `writeNet` function:\n\n```\nbyte  mac[] = {0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC};\nIPAddress  ip(192, 168, 1, 120);\nIPAddress  gateway(192, 168, 1, 1);\nIPAddress  subnet(255, 255, 255, 0);\n\n/* Write the new settings values to EEPROM */\nAthenaEEPROM.writeNet(mac, ip, gateway, subnet);\n```\n\nYou can change the TFTP data transfer port from the default setting, if needed, by using `writePort`:\n\n```\nword port = 46969;\n\n/* Set the TFTP data transfer port in EEPROM. Change it only if you need to. */\nAthenaEEPROM.writePort(port);\n```\n\nYou can change the AthenaEthernetReset URL \"password\" using the `writePass` function:\n\n```\n/* \n * This is the \"password\" for the reset server in case you want to reset your Arduino\n * remotely. This setting has no effect on the bootloader itself. Password can be 36 characters\n * long, at maximum. Any string longer than 36 characters will be truncated.\n * Spaces should not be used \n */\nString password = \"athena\";\n\n/* Write Reset Server password in EEPROM */\nAthenaEEPROM.writePass(password);\n```\n\nYou can manually set the programmed application image marker as \"bad\". In this case, the bootloader will think that there is no active application and will remain in bootloader mode until a new sketch is received:\n\n```\n/* Set image status to bad, so upon reboot the bootloader won't load the previous sketch */\nAthenaEEPROM.writeImgBad();\n```\n\n## Example Sketches\n\nExample sketches are provided:\n\n1. [ReadNetworkSettings](examples/ReadNetworkSettings/ReadNetworkSettings.ino)\n2. [WriteNetworkSettings](examples/WriteNetworkSettings/WriteNetworkSettings.ino)\n3. [eeprom_clear](examples/eeprom_clear/eeprom_clear.ino) - demonstrates erasing all data from the EEPROM, except for Athena data\n4. [eeprom_read](examples/eeprom_read/eeprom_read.ino) - demonstrates reading from the EEPROM\n5. [eeprom_write](examples/eeprom_write/eeprom_write.ino) - demonstrates writing to the EEPROM\n\nThe [ReadNetworkSettings](examples/ReadNetworkSettings/ReadNetworkSettings.ino) sketch uses the AthenaEEPROM library to print out the currently configured network settings:\n\n```\n--- Network Settings ---\n    MAC: 0xDE.0xAD.0xBE.0xEF.0xFE.0xED\nAddress: 10.0.1.199\nGateway: 10.0.1.1\n Subnet: 255.255.255.0\n--- Tftp Settings ---\nData Port: 46969\n(Default)\n--- Reset Server Settings ---\nPassword: athena\n  Length: 7\nSettings read, you can now upload another sketch.\n```\n\nThe [WriteNetworkSettings](examples/WriteNetworkSettings/WriteNetworkSettings.ino) sketch can be used to update the network settings for a device. Note that you *must* write network settings to the device before it can be properly used to update devices over Ethernet.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembeddedartistry%2Fathenaeeprom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fembeddedartistry%2Fathenaeeprom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembeddedartistry%2Fathenaeeprom/lists"}