4 Storaggio di un valore e sucessiva lettura.
9 // the current address in the EEPROM (i.e. which byte
10 // we're going to write to next)
16 Serial.println("Storaggio valore");
17 // EEPROM.write(addr, 124);
18 // Eseguire una volta sola, caricare lo sketch
19 // e immediatamente commetare e ripetere l'upload.
24 Serial.print("Lettura Valore: ");
25 Serial.println(EEPROM.read(12));
28 // need to divide by 4 because analog inputs range from
29 // 0 to 1023 and each byte of the EEPROM can only hold a
30 // value from 0 to 255.
31 int val = analogRead(0) / 4;
33 // write the value to the appropriate byte of the EEPROM.
34 // these values will remain there when the board is
36 EEPROM.write(addr, val);
38 // advance to the next address. there are 512 bytes in
39 // the EEPROM, so go back to 0 when we hit 512.