1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

EEPROM: fix incorrect start address, support multiple instances

related to #279, #240
This commit is contained in:
Ivan Grokhotkov
2015-05-21 10:22:45 +03:00
parent 6e14666d2f
commit b1f2fdb9cc
3 changed files with 104 additions and 109 deletions

View File

@ -22,7 +22,7 @@ void loop()
// need to divide by 4 because analog inputs range from
// 0 to 1023 and each byte of the EEPROM can only hold a
// value from 0 to 255.
int val = analogRead(0) / 4;
int val = analogRead(A0) / 4;
// write the value to the appropriate byte of the EEPROM.
// these values will remain there when the board is