Traffic light
- Scratch
- Arduino
led red = led pin 4
led green = led pin 3
forever:
red on
wait 3 s
red off
green on
wait 3 s
green off
First real circuit: two LEDs, one loop, and a working junction on the desk.
From a first Scratch animation to a robot that finds its own way, learners aged 5 to 18 build, code and test real machines, in class, after school and in the holidays.
Scratch · Arduino · Nova
THE MAKING LAB / PROJECT 01
Two sensors, two motors and a question: how do you teach a robot to follow a line?
1 sensor left = line sensor pin A02 sensor right = line sensor pin A13 motors drive = motor pair pins 5 64 5 forever:6 if left sees line:7 drive turn left8 else if right sees line:9 drive turn right10 else:11 drive forward 60 %Watch the right sensor as the car reaches a corner. In this clockwise example, detecting the line calls for a right turn; on the straight sections, the program chooses forward. The highlight connects each decision to its instructions.
A CLASSROOM QUESTION
What would you change if the car kept missing the corner?
Build something. Watch what happens. Try a better idea. That’s where the learning begins.
Explore more builds▸ TRY NOVA · OUR OWN LANGUAGE
Nova lets learners name the parts they wired and tell them what to do in plain words. It's the bridge between blocks and Arduino code.
1 led status = led pin 132 button door = button pin 23 buzzer alarm = buzzer pin 64 5 when door pressed:6 status on7 alarm tone 440 Hz8 wait 500 ms9 status off SERIAL
FIG. 02 — BREADBOARD
status · pin 13
alarm · pin 6
Pressed 0 times · drag the slider, then press again
HOME > PROGRAMS
Explore a program →
LEARNING PATHWAY · PICK AN AGE
WHAT THEY LEARN
Sensors, inputs and outputs, written in our Nova language.
SAMPLE PROJECT
A door alarm with a button, LED and buzzer
TOOLS
HOME > PROJECTS
Hover a project to see its code ↓
led red = led pin 4
led green = led pin 3
forever:
red on
wait 3 s
red off
green on
wait 3 s
green off
First real circuit: two LEDs, one loop, and a working junction on the desk.
led status = led pin 13
button door = button pin 2
buzzer alarm = buzzer pin 6
when door pressed:
status on
alarm tone 440 Hz
wait 500 ms
status off
Inputs and outputs: a button press sets off a light and a sound.
sensor eyes = distance sensor pin 7
motors drive = motor pair pins 5 6
forever:
if eyes reads under 20 cm:
drive turn right
else:
drive forward 70 %
A team build: sense the world, decide, and move on its own.
HOME > FAQ
Something else on your mind? Send us a message below and we'll reply.