Scrolling text

Step 1 /10

Workspace introduction

You get your blocks from the Block Menus. Click on one of the titles to see its blocks.

Block Menus

Your code blocks will go on the Workspace


You create your programs by dragging blocks from the Block Menus to the Workspace and snapping them together.

Step 2 /10

Emulator Introduction

You test your code with the CodeBug emulator.

The emulator shows your code running, you can light up the LEDs and click the A and B buttons.

CodeBug emulator

Control the emulator using these buttons. The play button runs your program and the stop button stops it.

CodeBug emulator controls

Step 3 /10

Sprite menu

Now we are going to build some code using different blocks.

Click the Sprite menu.

Sprite block menu

Drag the scroll sprite block and snap it below the start block onto the workspace.

scroll sprite block

Step 4 /10

Get string sprite

Notice that your scroll sprite block has a jigsaw piece shaped slot. These allow you to add extra information into blocks.

Puzzle gap

From the Sprite menu, drag the get string sprite block and snap it’s puzzle piece into the puzzle gap of your scroll sprite block.

Puzzle snapped

Step 5 /10

Changing text

Click on the Hello, World! text, and type your name to replace the text.

Step 6 /10

Running code

Click the Play button below the CodeBug emualtor.

Emulator play button

Watch your name scrolling on the CodeBug emulator. Congratulations, you have run your first simple program!

Step 7 /10

While loops

Great! Your program scrolls your name, but only once. Wouldn’t it be cool if it scrolled repeatedly? You’ll now add a repeat while true block to repeat (loop) the blocks inside it forever.

From the Loops menu drag in the repeat while true block into an empty area on the workspace.

Step 8 /10

Continuous code

Drag your scroll sprite block into the body (the gap) of your repeat while true block so your code will repeat continuously. Now snap this while loop and its blocks onto the start block. Your code will look like this:

Scrolling text

Step 9 /10

Run again

Click the run button again and watch your name scroll continuously.

Step 10 /10

Download your code

Click the Download button to download your program.

Download button

A box will appear with Close and Download buttons. When the Download button turns green, click it to download your code. Then click the Back to activity button.