Arduino 4 KidsBuild. Code. Create.
HomeProjectsFor KidsLearnSimulatorCodeQuizChallengesCommunitySafetyMy Log
Sign in
HomeProjectsFor KidsLearnSimulatorCodeQuizChallengesCommunitySafetyMy Log Sign in
Code library

Arduino code examples you can run right now

Every sketch here is short, tested and explained line by line. Copy it into the Arduino IDE, or press one button and watch it run in the browser simulator — no board needed.

Open the simulator
  • 💡

    Blink an LED

    Blink is the first sketch everyone writes. It switches an LED on, waits, switches it off, and repeats forever — the timing pattern almost every other Arduino project reuses.

    See the code
  • 🦾

    Servo sweep

    A servo moves to an angle you choose and holds it there. Two sketches cover almost everything: one that jumps to set angles, and one that sweeps smoothly from 0° to 180°.

    See the code
  • 📡

    Ultrasonic distance

    The HC-SR04 sends a burst of sound and times the echo coming back. Divide that time by 58 and you get the distance in centimetres.

    See the code
  • 🌡️

    DHT11 temperature

    The DHT11 measures temperature and humidity together and reports both over a single data wire. It needs the DHT sensor library, which you install once from the Arduino IDE.

    See the code
Arduino 4 Kids

A playground for young makers. Wire it up, write the code, watch it come alive, one blinking LED at a time.

Build

  • All projects
  • Challenges
  • Code Playground

Learn

  • All lessons
  • What is Arduino?
  • Programming basics
  • Code examples
  • LED resistor calculator

Makers

  • Community
  • Search

Made with for curious young makers everywhere.

Open source hardware, open minds.