Can't figure out where I am wrong here (but obviously I am...)

Trying to store a uint32_t value to memory (myDecoder.value).

EEPROM.write(1,myDecoder.value & 0xFF);
EEPROM.write(2,(myDecoder.value >> 8 ) & 0xFF);
EEPROM.write(3,(myDecoder.value >> 16) & 0xFF);
EEPROM.write(4,(myDecoder.value >> 24) & 0xFF);

Not sure this is storing the variables correctly…

However, this certainly isn’t re-assembling them…

Bit1=EEPROM.read(1);
Bit2=EEPROM.read(2);
Bit3=EEPROM.read(3);
Bit4=EEPROM.read(4);
myDecoder.bits=EEPROM.read(5);myDecoder.value=((Bit1 << 0) & 0xFF)+((Bit2 << 8 ) & 0xFFFF)+((Bit3 << 16) & 0xFFFFFF)+((Bit4 << 24) & 0xFFFFFFFF);

I am suffering from Christmas… so my brain has refused to function at 100%

If you are on a 328 based Arduino then don’t mess about with bytes, use the put() and get() methods instead

It will help to see the declarations of Bit1 and its friends. In code tags too.

Note that left-shifting a byte by 8 bits gives you an empty byte.

Or maybe you should use the modern .get() and .put() methods for the EEPROM.

You didn't tell us what type your operands are, but left shifting a sixteen bit int value by sixteen or more places isn't going to work.

It's one of the reasons we ask you to post all your code - it saves much time.

Using code tags often saves time too.

oh :confused:

I found this page (which doesn't work)...

http://playground.arduino.cc/Code/EEPROMReadWriteLong

And tried to adapt it.

No idea how to use Put and Get. Yet more time on Google then

Starting with the reference is often a good strategy.

Thanks all. No idea 'Put' and 'Get' existed.
Problem solved

Steve-SFX:
Thanks all. No idea 'Put' and 'Get' existed.
Problem solved

Put() and Get() don't exist

However, put() and get() do exist

if you do want to assemble a 32-bit value by bit shifting 4 8-bit values, (shift the 32-bit value and add the next highest byte) 4x