0

SPST Rocker Switch wiring with Metro
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

SPST Rocker Switch wiring with Metro

by rachelmax on Mon Aug 26, 2019 10:04 am

Hello - I'm making a lamp with an Adafruit Metro - which will be powered via a switching adapter using 9volts to a wall outlet.

I'd like to add a SPST Rocker Switch on the base of the lamp for easy on/off access.

I've read all sorts of different articles - some say to use a resistor on both terminal of the switch, some use none, and some use pull-up resistors in the code (still don't quite understand those).

Should I have the power (9V) - coming from the wall - going into the rocker switch on one side, then out the other side and going to the barrel jack on the Metro? Or should I put the switch in the GRD? Should I use physical resistors? If so, what size?

Thanks much,
Rachel
Attachments
Artboard 1.png
Artboard 1.png (21.29 KiB) Viewed 42 times

rachelmax
 
Posts: 35
Joined: Sat Mar 11, 2017 11:40 pm

Re: SPST Rocker Switch wiring with Metro

by adafruit_support_bill on Mon Aug 26, 2019 10:28 am

To use as a power switch, wire it exactly as you have drawn it. Pull-up resistors are not needed for that application.

adafruit_support_bill
 
Posts: 74364
Joined: Sat Feb 07, 2009 10:11 am

Re: SPST Rocker Switch wiring with Metro

by rachelmax on Mon Aug 26, 2019 11:11 am

Thanks!

rachelmax
 
Posts: 35
Joined: Sat Mar 11, 2017 11:40 pm

Please be positive and constructive with your questions and comments.