Creating a new script

Editor menu bar

'my scripts' takes you back to a list of your scripts. The open script is automatically saved (in the cloud) when you leave the editor.

'run' executes your script, showing you the results on the on-screen microbit device.

'compile' sends your script to an ARM compiler, which creates a file that you can run on your microbit.

'undo' undoes changes that you made to your script.

'search code...' searches for functions in libraries.

'script' opens script options, where you can do things like publish and preview.

Code keyboard

To open the Code Keyboard, click on a line of code.

An on-screen keyboard appears, with buttons that vary depending on what's selected.

Statements.

The first row of the Code Keyboard has Touch Develop statements that you can insert into your code. These buttons are blue and include things like var, if, for , and while.

The BBC microbit, math, and code buttons.

'microbit'. Click to see all the microbit functions; click 'more' to scroll left to right. The microbit functions are also grouped together behind the following category buttons: 'basic', 'control', 'input', 'image', 'led', and 'pins'.

'code'. Click to access functions you've written.

'math'. click to see math functions; such as 'abs' and 'round'.

'bits'. Click to see functions for bit-level manipulation of integers.

Editing code

In the coding area:

'add'. to add a new line, click on a line and then click a + to add a new line above or below the current line.

'copy', 'paste', 'cut'. Click on a line then click copy or cut. Then click on a new line, and click paste.

Block editing

To copy, cut, or comment out a block of code (more than one line):

Click on a line of code.

Press and hold the Shift key, and then press the Up arrow or Down arrow key on your keyboard (this selects multiple lines).

Script options

'script properties'. The script name, description, and whether or not the script is a library

'publish'. Share a script with other users by publishing it.

'share'. Share a link to a published script.

'preview'. Preview a documentation script.

'+'. Add a new function, global variable, picture, or library to a script.

'code'. The functions in your script; click a function to open it in the editor.

'global vars'. The global variables in your script; click a variable to go to that variable.

'libraries'. The libraries added to your script.

'art'. Picture and video resources added to your script.

Script properties

To edit a script's properties, click script (in the upper-right corner), and then click the script name or script properties.

'name'. The script's name (60 character limit).

'description'. A description of what your script does along with #hashtags for search (for example, #game or #maker). Hashtags are especially important if you publish your script (200 character limit).

'this script is a library'. Click this check box to turn a script into a library.