Skip to content

Your First Program

Goal: make the hub show a smiley, beep, then spin a motor one rotation. Five minutes.

How this site writes blocks

Word Blocks are drag-and-drop, so this site represents block stacks as indented text, one block per line:

wordblocks
when program starts            ← yellow hat block from Events
display image [SMILE]           ← Light category
play beep [60] for [0.5] seconds  ← Sound category

Square brackets [ ] are the dropdown/input values on the block. When you see a stack like this, rebuild it in the app with the same-named blocks.

Setup

  1. Plug a motor into Port A.
  2. Create a new project, choose Word Blocks.
  3. Make sure the hub is connected.

The program

wordblocks
when program starts
display image [SMILE]
play beep [60] for [0.5] seconds
run motor [A] [clockwise] for [1] rotations
turn off pixels

Block by block:

BlockCategoryWhat it does
when program startsEventsProgram entry point. Every program needs at least one hat block
display imageLightShows the chosen pattern on the 5x5 light matrix
play beepSoundSounds the hub's own speaker (note: the "play sound" block plays on the connected computer/tablet, so it stays silent offline; beeps come from the hub itself)
run motor A for 1 rotationMotorsTurns the Port A motor one full rotation, finishing before the next block runs
turn off pixelsLightClears the light matrix

Run it

Click Download & Run. You should see: smiley lights up → the hub beeps → motor turns one rotation → lights go out.

Motor didn't move?

  • Check the motor is in Port A - the port in the program must match the actual wiring.
  • Open the hub connection panel: is a motor detected on Port A?
  • Push connectors all the way in; loose cables are the #1 problem.

Experiment

  1. Change [1] rotations to [720] degrees and observe (2 rotations).
  2. Add a Motors set speed block before the movement, set it to 100%.
  3. Try another image, and change the beep pitch from 60 to 72.

What you learned

  • A program = a hat block (when to trigger) + a stack of blocks below (what to do)
  • Blocks run top to bottom; most blocks finish their job before the next one starts
  • Port letters must match the physical wiring

Next lesson: Motor Control - every way to use a motor.

© 2026 FLL Knowledge Base · All rights reserved