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

  • \$\begingroup\$ Normally I'd say, "Go read the datasheet." But in this case I can see that you are hindered with un-rythmed palpable clag! And the so-called drawing is no better at explaining the pin-out A to F. From the breadboard photo, either pin E or pin F is common, but I can't tell whether that's common ground or common supply. Also, either pin A or pin D is common. \$\endgroup\$
    – tim
    Commented Sep 18, 2020 at 12:22
  • 1
    \$\begingroup\$ Also it is unknown if the part number is TSD1265 or TSL12121 or something else. The right address to ask about it is to complain to Sparkfun that their datasheets for that part are useless. \$\endgroup\$
    – Justme
    Commented Sep 18, 2020 at 12:41
  • \$\begingroup\$ If the + and - markings on the breadboard photo can be trusted (not connected backwards), then pin E or pin F is common ground, and pin A or pin D is common V+. I can't discern the orientation of the button to figure out which is E or F, nor which is A or D. \$\endgroup\$
    – tim
    Commented Sep 18, 2020 at 12:42
  • 1
    \$\begingroup\$ Use your multimeter set do "diode" mode, then measure the forward voltage between pins. When you have found a combination giving roughly some ~1V, then the + probe of the multimeter is on the anode and that's where you add the supply. Make sure to add a series resistor too, either before or after the LED, or otherwise it will go poof. \$\endgroup\$
    – Lundin
    Commented Sep 18, 2020 at 13:33
  • \$\begingroup\$ Can you see a "+" sign moulded into the white plastic? It shows up in one of the photos on the page you linked to. \$\endgroup\$ Commented Sep 18, 2020 at 19:06

1 Answer 1


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.

  • \$\begingroup\$ Those LEDs look very bright in the breadboard photo! \$\endgroup\$
    – tim
    Commented Sep 18, 2020 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.