Go Down

Topic: Store IPAddres in PROGMEM or EEPROM... how? (Read 1 time) previous topic - next topic

DanielaES

Hello,
I have some IPAddress that I'd like storing somewhere e get some space in ram back...
Code: [Select]
IPAddress ip(192,168,0,9); // IP in lan
IPAddress gateway(192,168,0,1); // Internet access via router
IPAddress subnet(255,255,255,0); // Subnet mask
IPAddress dns(208,67,222,222); // OpenDNS IP

I never worked with eeprom and I usualy use F() to PROGMEM in IDE 1.0.
Anyone have an example to store IPAddress in eeprom or progmem with IDE 1.0?
Since I'm at the beginnig I'd really apprecciate some pratical guide /example :) Thank you!

gerg

Use the EEPROM library to read/write from the EEPROM. IIRC, there is also an 'anything' eeprom library which may be a little easier to deal with from non-byte types.
http://maniacalbits.blogspot.com

PaulS

Storing the IPAddresses in EEPROM will not save any SRAM. You need to fetch them all into SRAM in order to actually use them.
The art of getting good answers lies in asking good questions.

Go Up