Skip to content

Manual and Automatic Traffic Lights

Potentiometer is connected by one terminal to 3,3V power supply and by the other to the ground; and now the magic... third central terminal (called wiper) can be regulated from-coast-to-coast, flying from first to second terminal and viceversa, setting its value from that to this.
(Pay attention: we regulate resistance's value, not power supply).

Potentiometer-allPotentiometer-terminalsPotentiometer-wiperWhat can wiper (third photo) do for us?

It's our manually-activated sentinel, which report every news directly to Arduino's Analog Pin 0.

 

What will wiper say to board?
The voltage it has on itself (always referring to ground); a real continuous size.

Arduino's brain will elaborate this value, transforming it to an equivalent on a numeric scale from 0 to 1023.
[0 to 1023 means 1024 values, and 1024=2^{10}; bit is the basic information for computers, 0 or 1 that is one of 2 possible values]

Pot's - familiar for potentiometer - opposite terminals one for zero resistance the other for the max are usually on the same side, while wiper's on the opposite.

potentiometer-schemeBeside, a common pot representation. You see that connecting directly the first 2 on circuit, so we'll get the whole resistance's value: wiper modulates it.

Despite of your possible thoughts - for who has no confidence - pots usually haven't a privileged direction; wiper will short-circuit resistor to a certain point, so decreasing or increasing resistance.