-A +A

 

Review

Connecting Components

A switch with a pull-up resistor

¿Por Que? Because not using one can lead to "open grounds," which can cause spurious voltages to sometimes creep into the pins your testing for voltage values

A switch with a pull-down resistor

¿Por Que? Same issue as pull-up resistors

Reference

A potentio­meter

Interestingly, the poteniometer, since it's hooked to ground, will act as a "voltage divider," (which it would not do if you didn't hook up the ground). This gives reading between 0 and 1023 with the Arduino no matter what Ohm value you use for the poteniometer.

A Photo­resistor

Reference, and a good read for general Arduino concepts

finB+