Hope you are all doing well. I have been trying to fix a rgb rotary encoder I bought a while ago. For the record, I am very new to arduino.
So I bought this one to be exact:
I am struggling to make it work even though I am just trying to run the example code in the document tab from the previous link. (link to code below)
The only thing that I got working is the rotary encoder itself, when I turn it, I get an increasing or decreasing counter but that’s it. The switch does not work when I press the button (I did set the pull down resistor) and the led is not working.
I did all the connection as mentioned in the code comments, I triple checked so I assume everything is fine from this point of view (can take pictures if someone want to double check).
So I started to wondered if maybe the rotary encoder could be damaged and here is my question.
When I try to test the different pins with my multimeter (set to test leds), I manage to lit up the led in red with the pin 1 but pin 2 and 4 don’t make it turn green or blue. it just stays off.
I tried it on the 6 other rotary encoder I got and that’s the same issue so I doubt they are all damaged. Do I get anything wrong? Should not I be able to turn it green and blue as well when I test all the pins?
Also I tried to test the different encoders for continuity and when I push the button and try the continuity between pin 3 and the common anode, I don’t get anything. Am I missing anything?
Last piece of information that might be helpful maybe, I am using an Elegoo mega2560.
Any help would be appreciated Did anyone used that rotary encoder before and could give me a hand on this?
Thank you for your answer. I actually managed to get the leds working. The diagram was a bit confusing and I inverted the pins so 1 was actually the 5 in my wiring.
However the switch still does not work with the code example. I did use a 10k pulldown resistor and it should be wired properly but no lick so far.
I did test the continuity for the switch and it works fine so Not sure why the I can’t get it working
I am adding a picture of my wiring in case I did something wrong. I changed the pin number in the code so it’s the number 7 for the switch as I changed it in the wiring.