Getting Started with the Touch Develop Editor
Getting Started with the Touch Develop Editor for the BBC microbit:
The Touch Develop Editor for the BBC microbit centres around a code keyboard, making it perfect for writing code on a touch screen device or by using your mouse.
- Converting script from Block Editor
- Creating a new script
- Editor menu bar
- Code keyboard
- Editing code
- Block editing
- Script options
- Script properties
Any Microsoft Block Editor Script you have created can be converted into a Microsoft Touch Develop script to help you get started.
Open or create your script in Block Editor and click convert on the menu bar at the top.
In the code preview screen click convert at the bottom.
The code is now imported into the Touch Develop Editor.
To create a new script go to microbit.co.uk and click Create Code.
Click New Project under Microsoft Touch Develop.
The Touch Develop editor has a bar of options above the code area.
- '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.
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.
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.
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.
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).
- Choose a block editing option like copy, cut, or comment out.
Click 'script' (in the upper-right corner) to open the script options. Here you'll find options like:
- '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.
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.