Lessons and the learning game

First inventions (ages 8 to 12)

Seven small inventions on one bench: lamps, a doorbell, a night light, a reaction game, a traffic light, a fan and an alarm for your room.

What you build

One bench with everything already wired, so young inventors spend their time on ideas, not loose wires. Each lesson loads a new sketch onto the same parts.

  • The brain: an Arduino Uno.
  • Three lamps: red, yellow and green LEDs, each with its own 220 ohm resistor, on pins 4, 5 and 6.
  • A button: a pushbutton on pin 2.
  • A buzzer: an active buzzer on pin 7.
  • A light sensor: an LDR in a divider with a 10k resistor, on A0.
  • A fan: a small fan module with its own driver chip and a soft propeller, on pins 9 and 8.

How it works

Current flows in a loop. Out of a pin, through a resistor and a lamp, and back to ground. The resistor keeps the current to about 15 mA, just right for a lamp. A smaller resistor makes it brighter, and with none at all the lamp burns out.

Buttons read LOW. The button joins its pin to ground, and a pull-up inside the board keeps the pin HIGH until then. So pressed means LOW.

A sensor is a changing resistor. The LDR's resistance goes up in the dark. With the 10k it makes a voltage divider, and analogRead() turns the voltage into a number from 0 to 1023. The night light switches on under 400 and off over 500, and that gap stops it flickering.

Time is a number. delay() waits, and millis() counts the milliseconds since the board started, which is how the reaction game times you and the alarm gives you five seconds to leave.

Motors need a driver. A pin cannot give a motor enough current, so the fan's driver chip does it. analogWrite() switches the pin on and off very fast to set the speed.

The course

First inventions has seven short lessons:

  1. Light a lamp: on, blink, and why every lamp needs a resistor.
  2. A doorbell: a button, a ding dong and a visitor count.
  3. A night light: a light sensor that switches a lamp on in the dark.
  4. A buzzer game: a surprise wait, your time in milliseconds and a record.
  5. A traffic light: red, yellow and green, with a walk button that beeps.
  6. A spinning fan: off, slow and fast from one button.
  7. Project: an alarm for your room: arm it, leave, and catch the intruder.

Every step is checked against the running circuit, apart from the last, where you make the alarm your own and share it.