How do I wire a led button?

I have a momentary push button with a 12V, NC, NO, C and Ground connector. How do I wire it to the Arduino? I already got the light on and off but I don’t know how to read the input.


To monitor 12vdc with the Arduino you need to use a fixed resistor divider.


Then read this discussion:

larryd: To monitor 12vdc with the Arduino you need to use a fixed resistor divider

I would guess that's not needed here, but the OP should check first before assuming I am correct.

I suspect the 12V connector is only the led anode, and the ground connector is the cathode, and that there is an internal current limiting resistor, chosen for 12V supply, in series with the led.

I suspect the NC, NO and C connectors are for the switch and not connected to the 12V or ground connectors internally.

Julian, you should use your multimeter on continuity mode or resistance mode to check if there is any continuity between the 12V or ground and the NC, NO, C connectors. I think there will not be.

If I am right, you only need to connect the NO and C connectors between an Arduino pin and ground, and use INPUT_PULLUP in your sketch.

As a puzzle: read your op and work out how many different ways it can be interpreted and what information you would need to add so that it can only be interpreted in the way that represents your setup.

After this, post the additional information and people will be able to help without guessing what your issue is. The forum guidelines give a really good introduction into how to write a good post most likely to get you the information you require.

This recent post asks essentially the same question. :grinning: