My Cart:

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

0

Getting Started With Microsoft MakeCode Editor

2150_KIT01_banner-kitronikuniversity_002_v1

This Kitronik University Resource is a part of the BBC micro:bit partnership and is a basic guide for getting started with Microsoft MakeCode Editor.

kitronik_microbit_logo_870

Getting Started with Microsoft MakeCode Editor for the BBC micro:bit:

The Microsoft MakeCode Editor is a drag and drop editor for the BBC microbit that provides a simple introduction to programming. Blocks snap together to build programs and are grouped by the type of function they do. When a group is selected, the commands in the whole group are highlighted and can be selected. It's a great introduction to programming for those with little or no experience.

The MakeCode editor was formerly known as the PXT editor and was developed as a replacement for the original block editor. The new editor has many more blocks than the original editor, which enables you to more fully take advantage of the microbits capabilities.

If you are still using the original block editor, we would urge you to make the switch as it is much better in every way, and, works in the same way as the block editor did.

 

Course contents:

 

Selecting Blocks:

getting-started-with-makecode-editor-placing-blocks1000

1. Select a block category from the list on the left hand side of the page.

2. Select a block from the selected category and drag it to the workspace area on the right.

3. Snap new blocks onto existing blocks in the workspace area. As the new blocks are dragged into the workspace, the editor highlights the connecting parts of each block when they are in a valid position to snap to existing blocks.

 

Saving, Downloading And Sharing:

getting-started-with-makecode-editor-saving-870

Saving: Your code is automatically saved as you work, you can access your saved work by clicking on the Projects icon shown in the above image. To make your projects easier to find, it is always good practice to name your project in the space provided at the foot of the editor.

Downloading: In order to get your code onto a micro:bit, you must first download it. Towards the bottom left of the editor is a large download button, when you click this button the code in your workspace will be compiled as a HEX file and then downloaded to your computers default download folder.

Connect your microbit to your computer via USB and the microbit will show up as a removable drive. You can then drag HEX files from your downloads folder and drop them directly onto your microbit. You wil notice that during file transfer, the orange light on the rear of the microbit will begin to blink, once the transfer is complete the light will stop blinking and the program is ready to go.

Sharing: When you click on the sharing icon the editor will first publish the code and then you will be able to share your project either via a link or by embedding your code. To see the embed options click on Embed and you will be able to choose from; Screenshot, Editor, Simulator, and Command line. Copy the code and insert into your web pages HTML. Experiment and see which option works for you. In the example above we chose the Editor option, which allows you to download the code, view the Javascript, and open the code in the actual editor. You can even use the simulator in the same way as you can with the actual editor.

 

How to Delete Blocks Using Microsoft Block Editor:

You can delete blocks in three ways. You have to select and highlight the blocks you want to delete (the edges change colour to yellow when the blocks are selected):

1. Press the DELETE button on your computer.

2. Select and drag the selected blocks into the 'bin' shaped icon that appears as you drag a block towards the blocks menu.

getting-started-with-makecode-editor-bin-100

3. Select the block and right-click on the selected blocks. A drop-down list will appear and select the 'Delete Block' option.

getting-started-with-makecode-editor-deleting-870

 

Searching For Code Blocks:

getting-started-with-makecode-editor-search-870

As an alternative to hunting through the various block menus for a particular code block, you can also search by name. The search bar is located immediately above the Basic blocks menu, type in your search term and the editor will display the blocks it thinks most match your search query.

 

The Simulator:

getting-started-with-makecode-editor-simulation-870

One of the great features of the editor is that you can test your code before you download it to a microbit. The simulator behaves just like a physical microbit and it also enables appropriate parts of the microbit when certain code blocks are being used, as can be seen in the above image, where the logo at the top of the microbit can be moved to simulate compass direction.

Same Day Dispatch
← Previous Post Next Post →

Leave a Reply