igorantolic / ai-esp32-rotary-encoder

Easy implement rotary encoder to your application using microcontroler like ESP32
GNU General Public License v2.0
284 stars 70 forks source link

EEPROM goes max value at esp32 wroom #82

Open fungreenfox opened 3 months ago

fungreenfox commented 3 months ago

include "AiEsp32RotaryEncoder.h"

include

byte PreFIX = 0; byte Fixer, Prefix;

EEPROM.writeByte(PreFIX, Fixer); PreFIX += sizeof(byte); EEPROM.commit();

Having the script to store a byte to EEPROM and a photodiode to take intervals every 500ms. Rotary potmeter to save the byte with. When that byte is stored, it is always readen as 128 in value.

If the store rutine is moved to its own script, with no other functions in, it will store and read correct value.

Are there any issues with AiEsp32RotaryEncoder.h and EEPROM.h?