Electronic – arduino – LED on tactile button

arduino

I'm a beginner in Arduino. How do I wire the LED tactile button? Which of the pins of the LED tactile button is the anode and cathode of the LED and which are for the buttons?

Tactile button with LED

Best Answer

A good guess would be that it's a standard 12mm tact switch pinout with the two outrigger pins for the LED. Here is a similar product (diagram from here). The similar product appears to have a red mark indicating the anode of the LED. There may be something molded into the plastic in the one you're looking at.

Note that there is no resistor in series with the LED. You probably know to add one, but I don't see any in that breadboard photo.

enter image description here

The layout is symmetrical so it can be rotated 180° to get the LED right without affecting the switch. Applying up to 5V in reverse to the LED won't hurt it (it just won't illuminate) so there is no danger in just trying it (assuming you have the resistor, otherwise your illuminated switch will likely quickly and permanently revert to being a non-illuminated type). They may be abusing an Arduino output in that photo, which is inadvisable.