Introduction to MakeCode – Home to Micro:bit Programs
Microsoft MakeCode – Home to all Micro:bit programs
Yes, you have read it correctly, the Micro:bit program development environment was developed and maintained by Microsoft. Rather the usual complicated programming language structure, MakeCode uses a graphical method, called blockly, to make the program development extremely simple and interesting. Best of all, unlike other programming languages, there is no complication of download or installation or setting up required. MakeCode interface is web based, i.e. all you need is a computer with internet connection and you can start immediately!
Accessing MakeCode
The link below provides direct access to MakeCode page, which will be the main development environment used throughout this course.
https://makecode.microbit.org
You will be brought to this screen upon clicking the link above. If you are not ready to start your own project, you may view any of the sample projects or tutorials at the bottom of the page.
Changing the Display Language
Depending on your requirement, you may wish to change the display language by clicking on the top right corner of this page.
However, please be reminded that, English will be used throughout this course.
Creating New Project
The mostly used function of this page is the big “+” button which says “New Project”, which will bring up the following dialog box.
Give your new project a name and click “Create” once done. Please note the smiling faces on top of this dialog, the more smiling faces appear, the more MakeCode likes your new project name.
The system will then proceed to create a blank project, as below:
Each part of the interface is explained below:
Simulator Area
This area always display a virtual Micro:bit, which will show the possible output base on the program built in the programming area. This is the area to look at when you are testing your program. However, there are situations where simulation will not be possible, such as radio and infrared connectivity, which you must download the program to Micro:bit before seeing it in action.
Pallet Area
This is the most colourful area on this interface. It provides a complete list of all the function a Micro:bit can perform in the form of command blocks. These blocks will be dragged and stacked in the programming area to build a complete program.
Programming Area
This is the most important area where we will spend most of our time in. This area is the space we use to build all the Micro:bit programs that we require by placing all the required command blocks. We will explore this area in depth in the coming sections.
Toolbar Area
This area is used to convert the program in the programming area to a HEX file, which contains the native language of Micro:bit, which can be downloaded and transferred to Micro:bit for further action. We will look at how this is done in the next few sections.
Embeded MakeCode
Throughout this course, we will be using the embeded MakeCode for all program samples or demo, as illustrated above. You can easily switch between Simulator and Blocks by selecting the respective area at the header bar as below:
You can edit any of the samples or demo codes by clicking on the Edit button on top right of the embeded MakeCode interface
Once clicked, you will be presented with the full MakeCode interface in a separate window where edit of the sample code is possible.
Yes! Reaching this point means that you are ready for your Micro:bit! But, before we start telling our Micro:bit to start working, let’s find out what are it’s features in the next section.