Visual Programming for All Ages

Scratch Tutorials

Learn to program LEGO robots using colorful drag-and-drop blocks. Perfect for beginners and young builders!

What is Scratch-Based Programming?

Scratch-based programming uses colorful blocks that snap together like LEGO bricks. Instead of typing code, you drag blocks from a palette and connect them to create programs. It's the perfect introduction to programming concepts!

Benefits

  • No typing or syntax errors
  • Visual feedback shows program flow
  • Easy to experiment and iterate
  • Great for ages 7 and up

Example: Move forward when button pressed

► When program starts
forever
if <button pressed> then
move forward for 1 second

Understanding Block Types

Events (Yellow)

Start your program when something happens

► when program starts
► when button pressed
► when color = red

Motors (Blue)

Control motor movement and speed

↻ move forward
↺ turn left 90°
■ stop motors

Control (Orange)

Control program flow and timing

⌛ wait 1 second
↺ repeat 10 times
∞ forever

Sensing (Cyan)

Read sensor values and detect events

🎨 color sensor
📏 distance sensor
🔄 tilt sensor

Conditions (Purple)

Make decisions based on conditions

if <condition> then
if/else
wait until

Sounds (Purple)

Play sounds and music

🔊 play sound
🎵 play note
🔈 set volume

Beginner Projects

PROJECT 1

My First Robot Movement

🤖

What You'll Learn

  • • Starting a program with events
  • • Basic motor movements
  • • Using timing blocks
  • • Stopping motors

Program:

► when program starts
↻ move forward for 2 seconds
⌛ wait 1 second
↺ turn right 90°
↻ move forward for 2 seconds
PROJECT 2

Color Detector

🌈

What You'll Learn

  • • Reading color sensor values
  • • Using if/then conditions
  • • Playing different sounds
  • • Forever loops

Program:

► when program starts
∞ forever
if <color = red> then
🔊 play "fire truck"
if <color = blue> then
🔊 play "water drop"
PROJECT 3

Obstacle Avoider

👁

What You'll Learn

  • • Using distance sensors
  • • Comparing values
  • • Autonomous robot behavior
  • • Backing up and turning

Program:

► when program starts
∞ forever
if <distance < 20cm>
↻ move backward 1 sec
↺ turn right 90°
else
↻ move forward

LEGO Platforms with Scratch

🚀

LEGO Boost

Ages 7-12

Learn More
📚

SPIKE Prime

Word Blocks Mode

Learn More
🤖

MINDSTORMS

Word Blocks Mode

Learn More
🚆

Powered UP

App Control

Learn More

Learn More About Scratch

Ready for Text Coding?

Once you've mastered Scratch blocks, you can graduate to Python programming!

Start Your Coding Adventure!

LEGO Boost is the perfect first step into robotics and programming

Explore LEGO Boost