You get your blocks from the Block Menus. Click on one of the titles to see its blocks.
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.
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.
Control the emulator using these buttons. The play button runs your program and the stop button stops it.
Now we are going to build some code using different blocks.
Click the Sprite menu.
Drag the scroll sprite block and snap it below the start block onto the workspace.
Notice that your scroll sprite block has a jigsaw piece shaped slot. These allow you to add extra information into blocks.
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.
Click on the Hello, World! text, and type your name to replace the text.
Click the Play button below the CodeBug emualtor.
Watch your name scrolling on the CodeBug emulator. Congratulations, you have run your first simple program!
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.
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:
Click the run button again and watch your name scroll continuously.
Click the Download button to download your program.
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.