A quick guide to simulate rotary encoder with ESP32 with arduino ide, It can be used to increase or decrease volumes, Counters, menu, rotation, etc. You can also use it as digital potentiometer.
Simulator Link: https://wokwi.com/
Source Code: https://www.theelectronics.co.in/2024/01/ky040-rotary-encoder-simulation-esp32.html
Music By: NoCopyrightSounds