Well the EEPROM.h
is really not there / included by default for the digispark-tiny
board.
However, the EEPROM.h
really is just a fancy wrapper for eeprom_write_byte()
/ eeprom_read_byte()
from avr/eeprom.h
. To be found here. You can just put this file in your src/
folder and then program as normal.
#include <Arduino.h>
#include <EEPROM.h>
void setup() {
Serial.begin(9600);
Serial.println("Write");
EEPROM.begin();
EEPROM.write(0, 0xAB);
Serial.println("Readback");
uint8_t readback = EEPROM.read(0);
Serial.println(readback, HEX);
}
void loop() {
}