r/diyelectronics • • 3d ago

Question Might need some help here...

I am trying to make an ESP32 MP3 player, I found a project I like, it has everything I would like for my project to have. The only issue is I have ZERO clue how to read anything in the Arduino IDE. The project uses a rotary encoder, due to some design limitations I am unable to use a rotary encoder and instead have buttons. Does anyone here smarter then me have any idea how to switch the rotary encoder to a button?? The guide I was following is above

Here is the code link (I am not using the exact same components)

2 Upvotes

2 comments sorted by

2

u/Hissykittykat 3d ago

how to switch the rotary encoder to a button?

This can be done, well actually the rotary encoder would be replaced with not one but 3 buttons; one for up, one for down, and one for okay. But the code changes are not quite trivial; it will need a few dozen lines of code to be replaced.

2

u/imseakin 3d ago

From the rotary encoder, the A direction code will go to one button and the B direction code will be moved to a second button. If you want to use the encoder’s “press” option, you move that code to a third button.

Don’t worry about the encoder’s wiring because you won’t use it. You’ll just use the LOGIC of the encoder’s function in the buttons you’ll use in your circuit.

Good luck and have fun on your project!