Hot answers tagged

3

I suggest this simple circuit: simulate this circuit – Schematic created using CircuitLab Set both inputs to INPUT_PULLUP. If the input reads LOW, that means it has been grounded by the switch. Edit: Per Duncan’s request, here is the alternative circuit with the polarities inverted. With the switch’s common connected to Vcc, the inputs should be set ...


1

You talk about wiring a switch to control lights directly. Instead, you want to use your switch to send information to your Arduino. You link to an SPDT (single pole, double throw) switch. When flipped one way, it connects the center pin to one of the outside pins, and when flipped the other way, it connects the center pin to the other outside pin. If you ...


Only top voted, non community-wiki answers of a minimum length are eligible