Hej guys,
For the past two days I have been struggling hard to make the breakout work. I basically want to make the led toggle on and off when pressing the cherry key. But its does not work. Surprisingly enough I am using the exact same code and circuit that I used to make it work with a normal button and led.
I have everything soldered and the test circuit of the cherry breakout guide works just fine. So up to that point everything is fine.
The problem is with this connection:
Switch 1 → Pin 2
Switch 2 → 5v
Led - → GND
Led + → Pin 3
I then have the loop checking for the digitalRead(Pin 2) and the value that comes oscillates between 1 and 0 kind of randomly, therefore my whole logic break downs because it expects to get 0 as a value and only 1 when the button actually gets pressed.
Any ideas? I havent been able to unstuck myself with the guide or the chorded keyer video/code or anything else for that matter. Do I need some kind of resistor between Switch 1 and Pin2? I have the current limiting resistor installed in the board.