Storage in EEPROM

Hello,

I'm a new developper on Arduino (UNO) and I would know if a possibilitie of one bit storage is possible in the internal EEPROM of the board.

In my software, I need to remember the position of a specific motor (1 or 0), after a electrical shutdown and a restart of the board.

Is it possible to remember a bit's value after a restart ? Is it possible to store this information in a non volatile memory (EEPROM) ? If not, how can I do to remember a single bit value ? (I just need to store one bit value 0 or 1).

Thanks for your help !

Best regards,

Gilles,

(gilles.defelix@laposte.net)

There are Bytes of EEPROM. You can read and write a byte with 0xFF or 0xFE, then act on the 1 bit:

if (EEPROM.read(0) == 0xFE){
// bit clear, do one thing
}
else {
// do the other
}

I used FF and FE as unprogrammed bytes read back as 0xFF

Thanks !