I'm followingthis and first I'm wondering wha ground actually means, I understand that it's safer to ground somewhere in a circuit.. is this right? And also, why is there a resister placed at the end of the circuit? Need to get into electronics still
why is there a resister placed at the end of the circuit?
When the switch is closed, it connects the Arduino's digital input pin to +5V, so digitalRead() reads HIGH.
However, without the resistor, when the switch is open, the digital input pin is left floating. It can pick up electrical noise and falsely give a HIGH result to digitalRead().
The resistor (known as a pull-down resistor) connects the input pin to 0V (ground) when the switch is open. This guarantees that digitalRead() gives a LOW reading. When the switch is closed, a small current flows through the resistor, but it is not enough to affect the HIGH reading.
I'm followingthis and first I'm wondering wha ground actually means, I understand that it's safer to ground somewhere in a circuit.. is this right? And also, why is there a resister placed at the end of the circuit? Need to get into electronics still
Thanks in advance!
You are confusing circuit ground, which is the reference voltage (zero volts) in the
circuit from which all signals are measured and earthing, which is done in mains
circuitry to prevent a live-short-to-case being lethal. The earthed chassis of the machine
causes massive current to flow and the fuse will blow.
Sometimes ground and earth are the same, often earth isn't present, the device is
low voltage or double-insulated / fully isolated from mains.