radio ID in EEPROM
-
At which address does the Radio ID get stored? I want to use the EEPROM on my sensor, but I want to make sure I'm not overwriting
-
Pos 0. Have a look in Sensor.h
#define EEPROM_RADIO_ID_ADDRESS 0 // Where to store radio id in EEPROM #define EEPROM_RELAY_ID_ADDRESS 1 // Where to store relay id in EEPROM #define EEPROM_DISTANCE_ADDRESS 2 // Where to store distance to gateway in EEPROM
If you're building a relaying node your have to lease space for routing table also (255 additional bytes).
-
@hek said:
yes, this part I found:
#define EEPROM_RADIO_ID_ADDRESS 0 // Where to store radio id in EEPROM #define EEPROM_RELAY_ID_ADDRESS 1 // Where to store relay id in EEPROM #define EEPROM_DISTANCE_ADDRESS 2 // Where to store distance to gateway in EEPROM
This part, help me to know
If you're building a relaying node your have to lease space for routing table also (255 additional bytes).
means only the relaying node needs this routing table, or if I add the relaying capability to a specific device.
Did you guys plan to reach any deeper into EEPROM in upcoming versions (foreseeable)?
I'm going to take 125 bytes for a project, but it only a project specific need and I want to make sure that I'm not creating another problem later.
In this project, I am going to hold some rain history data in EEPROM in case of a power loss for the rain gauge...
thanks for the help.
-
If your write above address 512 you should be safe.
If you look at the beta version of 1.4 you can see I've added eeprom read/write in the API for sketch usage (that doesn't overwrite any important MySensor stuff). Will make life easier for you.
-
@hek said:
If your write above address 512 you should be safe.
If you look at the beta version of 1.4 you can see I've added eeprom read/write in the API for sketch usage (that doesn't overwrite any important MySensor stuff). Will make life easier for you.
cheers mate
appreciated, as usual.