SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Yemen4u2
#190181
I'm attempting to use the EEPROM to store values that take up too much space in RAM. I'm programming in Arduino Code on the ATtiny85 microcontroller. According to the Arduino documentation this is how you write values to the EEPROM:
Code: Select all
#include <EEPROM.h>

void setup()
{
  EEPROM.write(0, 1);
  EEPROM.write(1, 0);
  EEPROM.write(2, 3);
  EEPROM.write(3, 2);
  EEPROM.write(4, 1);

}
However when I attempted to access those values with the
Code: Select all
EEPROM.read(0);
the program that had originally worked with hard coded values suddenly stopped working. After some further debugging I have begun to think that the values are either my code is wrong or the EEPROM can't be accessed with Arduino code.

I can't find an answer in the datasheets so I was hoping someone on here could let me know if the ATtiny85 forces us to use AVR studio to access the EEPROM.