Electronics · lesson 22 of 30 · free

Input and output pins — Electronics for kids

A microcontroller talks to the world through its pins. Input pins read buttons, knobs and sensors; output pins drive LEDs, buzzers and motors (motors through a driver). A digital signal has only two states: HIGH (about 5 V on a 5 V board) or LOW (0 V). An analog signal can be any value in a range, like a knob turned part way or the brightness of a room. In a program, “set pin 7 HIGH” turns on an LED on pin 7 and “set pin 7 LOW” turns it off — the last command for that pin wins.

▶ Watch how it works

Got it? Practise ↓

Remember

Read in, drive out — “input pins read buttons and sensors; output pins drive LEDs and buzzers”

  1. Inputs: buttons, knobs, sensors. Outputs: LEDs, buzzers, motors, displays.
  2. Digital: HIGH (≈ 5 V) or LOW (0 V) only. Analog: any value in a range.
  3. Trace the program: only the LED’s own pin matters, and its last command decides ON or OFF.

Use it for: First programs on a microcontroller board, wiring buttons and LEDs from a battery kit, and robotics lessons.

Worked example: 💡 An LED (with its resistor) is on pin 7. All pins start LOW. The program runs once: set pin 7 HIGH set pin 8 HIGH set pin 7 LOW Is the LED ON or OFF at the end? → OFF

  1. Lines for pin 7: HIGH, then LOW; pin 8 does not matter.
  2. The last command for pin 7 is LOW, so the LED is OFF.

Check: Remove the last line and pin 7 stays HIGH — ON ✓

▶ Watch it animated

✏️ Practice

Work it out in your head or on paper, type the answer and press Check. Stuck? Press “Show me how”.

Right: 0 · Tried: 0

🏁 Lesson 22 test

20 questions. Check each answer, then go to the next one. Get 16 or more right to pass.

🏅 Sign in with Google to earn the 📶 Pin Commander badge when you pass — and a certificate when you finish all 10 lessons of Part 3 · Microcontrollers and IoT. You can still take the test without signing in.

🖨️ Electronics Worksheet: Input and Output Pins

✨ Free AI tutor

Ask the AI tutor about this lesson

Why does it work? When should you use it? Ask in English, मराठी or हिंदी.

Sign in with Google to ask Free — 20 questions a day.

👩‍🏫 Electronics classes near you — online or at home

Prefer a real teacher? TalentJR teachers take live online classes anywhere in India and visit homes in selected cities. Tell us what you need and our team will call you with timings and fees.

Live online classesSmall groups or 1:1 with a teacher, from home, any city.
Teacher at homeA TalentJR teacher visits your home (selected cities).
At a centreClasses at a TalentJR partner centre near you, where available.
Badges, certificates & gifts A badge for every lesson you pass, a certificate for every part you finish, plus TalentJR Points for daily practice. Computer worksheets Flowcharts, block coding and spreadsheets.