Hi all. I'm new to the Arduino and any work with electronics beyond repairs. I'm having issues right now with a digital input to my mega from a Ulincos U16F1 push button switch.
Here is a wiring diagram for the switch though my setup has one difference I'll point out shortly.
Here is the wiring I have. The + 5v power on the mega. The grounding lead is hooked into the 5v ground on the Arduino as well is the ground for the 9v power source for the rest of the project. The NO lead is wired into pin 33 as an input and the + pin for the button LED is hooked up to pin 34 on the mega as an output pin to manually control when the LED comes on.
Here is the issue. As setup the switch only works at random and the the state will also change at random on it's own. However if I hook my multi-meter up to the input line leading to pin 33 the switch works perfectly. If I measure the voltage of the pin 33 input without it being hooked up to the switch it measures ~0.5v constantly. I don't know if that is relevant or not. The other input pins I have setup on the mega all measure ~0v. I have tried moving the input pin but that hasn't helped at all. I have tried adding a 100kohm pulldown resistor to the - line on the switch with no change in results.
I have also tried just removing the connection for the switch LED completely and also wiring exactly as in the setup diagram all with the same results. I also get the same results where I using debouncing on the input pin or not.
Any suggestions would be greatly appreciated.