LESSON 4 (ELECTRONICS)

What is Electricity?

Imagine everything in the whole universe — you, me, the table, the air, even the stars — is made of super-tiny Lego bricks called atomsEach atom is like a mini solar system:
 
In the middle is a nucleus (like the Sun, made of protons and neutrons).
Around it zoom tiny particles called electrons — they’re like little buzzing bees with a negative charge.

 

Electrons are special because they follow quantum rules — that means they don’t just move like normal things. They can act like tiny waves and like little balls at the same time, and they can even be in more than one place until we look at them! (Scientists call this “quantum weirdness,” but it’s what makes everything in the world work the way it does.) Now, electricity happens because some atoms — especially in metals like copper  — have electrons that are loosely attached to their nucleus, like bees that aren’t stuck to one flower. When we give those loose electrons a push (like with a battery or even rubbing a balloon on your hair), they start jumping from one atom to the next — like a huge game of tag across the metal wire! This moving crowd of electrons creates an electromagnetic field (a kind of invisible force bubble) around them, and that field pushes even more electrons along. That chain reaction is what we call electric current — the flow of electricity. So electricity isn’t a “thing” like water in a pipe. It’s actually billions of tiny electrons racing through wires, following quantum rules, carrying energy from a battery or power station to your light bulb, phone charger, or robot motor.

It is not perfect, but imagine Electricity is like water flowing through a garden hose. We note three important things:

 

Voltage (V)

is like the water pressure coming from the tap.
High pressure = water shoots out fast.
Low pressure = water trickles slowly.
A battery or wall socket gives the “push” (pressure) that makes electricity move.

Current (I)

is like the amount of water flowing through the hose each second.
Lots of water rushing through = high current (lots of electricity moving).
Tiny trickle = low current.

Resistance (R)

is like how narrow or clogged the hose is.
A wide, clean hose = low resistance → water flows easily → high current.
A very narrow or kinked hose = high resistance → water struggles to get through → low current.

 

 The rule that connects these three is called Ohm’s Law: The harder you push (voltage), the more water flows (current). The more blocked the hose is (resistance), the less water flows. So a simple way to remember it:  More push (voltage) → more flow (current)
More blockage (resistance) → less flow
The exact rule is:
Voltage = Current × Resistance
or
V = I × R
Scientists write it like this:
Voltage (V) = Current (I) X Resistance (R)

It’s like saying:
how hard you push = how much flows TIMES how blocked the path is.
We will learn more about this when we deal with components, but now lets see how we use electricity in computers.
Inside the Arduino (and every computer) there are two main jobs electricity does:
The switches (binary):
Every 1 or 0 is an electric switch that is either:
ON → electricity is flowing. 
OFF → no electricity is flowing.

 

When the computer wants to say “1”, it lets electricity flow through a tiny path. When it wants to say “0”, it blocks the electricity. That’s how the Arduino “thinks” and remembers letters, numbers, and instructions — just by turning electricity on and off super quickly in the right pattern.

 

The pins (the arms of the Arduino)
The little metal legs sticking out of the Arduino are called pins.
They’re like the robot’s arms — they can either:
Send electricity out (like telling a light bulb “turn on!” or a motor “spin!”)
→ that’s called output
Listen for electricity coming in (like feeling if a button is pressed or if a sensor sees something close)
→ that’s called input

 

So when we write code that says “turn pin 13 ON”, we’re really telling the Arduino:
“Let electricity flow out of pin 13 right now!”

DIGITAL VS ANALOG

Think of Arduino as a tiny robot brain that can only talk to the world through its little metal arms — those are the pins. The brain can talk in two very different ways:

 

Digital:

like a light switch — only two choices:
ON (full power, like 5 volts)  or  OFF (no power, 0 volts)
             It’s like the robot can only say YES or NO, 1 or 0
           Example: turning an LED on or off and reading if a button is pressed (yes/no)

 

      Analog:

like a dimmer switch on a lamp — it can be any brightness in between. Instead of just ON or OFF.
The Arduino can feel or send any value between 0 and 5 volts (like 0.1 V, 2.3 V, 4.7 V, etc.).
It’s like the robot can say: “The light is a little bit on… a medium amount on… almost all the way on…”

 

That’s perfect for things that have lots of in-between levels:
How bright is this light sensor?
How much is this knob twisted?
How loud is the sound?
How fast should the motor spin?

 

The Arduino Nano has special analog pins (A0 to A5) that can listen to these in-between values
(they read 0 to 1023, which is like 0 to 5 volts broken into 1024 steps).

Digital pins = light switch → only YES or NO (1 or 0)

Analog pins = dimmer switch → any value in between (lots of steps from 0 to full power)

The robot uses digital pins when it just needs to turn things on or off, and analog pins when it wants to know “how much” or “how strong” something is. Want to make the robot light get brighter the closer you get to it? That’s analog! Want to make it flash on and off when you press a button? That’s digital!”

NEXT UP..