This should be so simple but I cannot figure it out...
I am hooking up my Arduino to a Automotive bank of 3 switches.
const int systemButtonPin= 2
int systemButtonState =0;
systemButtonPin = 0;
In the loop
systemButtonState = digitalRead(systemButtonPin);
The Switch has a ground and a 12v in.
The Switch has a output that when measured is 11.9v on, and 0 off.
I take the output to a 5v stepdown which reads 4.9 on and 0 off.
The power out 4.0v (when on) from the stepdown goes to digital 2
Ground from the switch goes to the breadboard common ground.
When looking, the is always LOW (0) regardless of the switch setting..
When the switch is on, 12v goes to the stepdown and is 4.9 at the 2 digital pin. Why no change of state?