Hi all would be grateful for a bit of help here. I though this bit of my project would be easy but didn't read the eprom page well enough. Anyway it's fairly simple i think, i just don't know how to do it. Basically how do i convert a int to 2 8 bit bytes. I need to store some int's in the eprom but it's only bytes. Their is enough room just i just need pointing in the right direction for a simple way of doing the conversion to the eprom and back again. Cheers :)
here is the problem
unsigned int Var_1=1000; // 2 bytes
unsigned int Un_Var_1=1000; // ..
unsigned int Var_2=1000;
unsigned int Un_Var_2=1000;
unsigned int Var_3=1000;
unsigned int Un_Var_3=1000;
uint8_t Slot_A=0; // 1 byte
// 17 bytes in all
// EEPROM.write(3, Var_1); // Whats the best way to do this
// presumably i can split it
// into two bytes and then retreve
// it in a similar way
highByte and lowByte are a start.
Or the EEPROManything library/templates.
Ahh yes i think i'd seen the high byte low byte some were just couldn't quite remember. Cheers i think that's what i'm looking for. Will check the other thing as well.