12v illuminated toggle switch help!

Hello,

I need some help as I don’t know how to wire or what resistors to use. I got the led to light up on my raspberry pi… But the switch doesn’t turn anything on or off… what do I need to get this working. It’s a 12v 20ma, the same one spark fun sells and it has an led at the tip of the toggle. Willing to use Arduino too. If there is a tutorial on how to wire this thing please send it my way or shoot me a diagram on how to wire it up to Arduino or raspberry pi… code would help too of course. Thank you so much!!! I really appreciate it, the project is for a good cause. :slight_smile:

This might be helpful. :slight_smile:

https://imgur.com/7HUpufa

Yes that is helpful. But for some reason when I wire it as such the LED is on but the switch doesn’t activate the GPio pin. :frowning: . Maybe a resistor of some sort?

Switch off=led off , switch on=led on but no GPio pin activation. I have a 1.5k resistor going to the + from 3v3 and( -) goes straight to ground no resistance. The gpio is wired from the (+) to the pin.

Okay. So I got the switch to turn a diode on by connecting diode to ground on switch. Should work for gpio now right?

So it was ground to (-) on diode then ground to on diode long leg.

Exactly what is it you’re trying to do?

Are you wanting the LED to operate independently of the switch or just turn on with the switch?