My Cart:

0 item(s) - £0.00
You have no items in your shopping cart.

Getting Started with the Touch Develop Editor

bbc micro:bit microbit Getting started with Touch Develop Editor

This Kitronik University Resource is a part of the BBC microbit partnership and is an in-depth guide into getting started with Microsoft Touch Develop Editor.

bbc micro:bit microbit  _logo_870

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.

Course contents

Converting scripts from Block Editor

Any Microsoft Block Editor Script you have created can be converted into a Microsoft Touch Develop script to help you get started.

bbc micro:bit microbit  convert_block_editor_to_touch_develop

Open or create your script in Block Editor and click convert on the menu bar at the top.

bbc micro:bit microbit  convert_block_editor_to_touch_develop_preview

In the code preview screen click convert at the bottom.

bbc micro:bit microbit  convert_block_editor_to_touch_develop_done

The code is now imported into the Touch Develop Editor.

Creating a new script

bbc micro:bit microbit  bbc_microbit_website_870

To create a new script go to microbit.co.uk and click Create Code.

bbc micro:bit microbit  bbc_microbit_editor_editors_870

 Click New Project under Microsoft Touch Develop.

Editor menu bar

bbc micro:bit microbit  _touch_develop_bar_870

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.

Code keyboard

bbc micro:bit microbit  _code_keyboard_870

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

bbc micro:bit microbit  _touch_develop_edit_script_1000

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

bbc micro:bit microbit  _touch_develop_block_editing

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

  1. Click on a line of code.
  2. Press and hold the Shift key, and then press the Up arrow or Down arrow key on your keyboard (this selects multiple lines).
  3. Choose a block editing option like copy, cut, or comment out.

Script options

bbc micro:bit microbit  _touch_develop_script_options

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.

Script properties

bbc micro:bit microbit  _touch_editor_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.
Same Day Dispatch
← Previous Post Next Post →

Leave a Reply