Hello my name is Daniel. I am trying to hook up multiple toggle switches to a Arduino Mega and Arduino Uno . If you can please send me easy to read photos not schematics that show where exactly to put the pins on each Arduino. sincerly daniel
You're going to need to know a LOT more than that and you're going to have to supply more details than you have to get any useful response.
im actually trying to make a cold and dark startup panel i have some three pin onn off toggle switches.
Don't cross post; it makes me really, really cross
If you have three switches how many will be connected to the Uno and how many to the Mega?
Are the SPST, SPDT or DPDT switches (use Google if your don't understand) ?
What do you want to do with the switches?
In general you can connect switches to any Arduino pins except pins 0 and 1
Robin2: In general you can connect switches to any Arduino pins except pins 0 and 1
I'd also avoid putting the switches across the Gnd and 5V pins. ;)
One wire from GND of the uno/arduino goes to the centre pin of the first switch. One of the spare pins on the switch goes to a digital pin. ( pin 2 seems a nice place to start).
To connect your second switch run a wire from the centre pin of the first switch to the centre pin on your new switch. A separate wire from one of the spare pins on the new switch goes to a digital pin ( pin 3 would be a nice place to continue).
In your sketch, for every switch you've configured this way, you'll include a line similar to the following in your setup function.
//replace "PN" with the pin number that the switch is attached to pinMode( PN, INPUT_PULLUP);
To check the status of any switch you use
//replace "PN" with the pin number that the switch is attached to digitalRead( PN );
Edit: code "improved" to reduce discombobulation.
KenF: To check the status of any switch you use
digitalRead( PN, INPUT_PULLUP);
Copy / paste error there, KenF....
JimboZA: Copy / paste error there, KenF....
:) yep. I'll amend it right away.