Developer/Provider: | Microsoft Research |
Application Type: | Web Application |
Operating System: | Cross-Platform |
Calliope mini Version: | V3, V2, V1 |
Account Required: | No |
Installation: | No, only for the offline version |
Usable Offline: | Yes, after the first save in the local cache or as a program. Additionally, offline versions for different operating systems here can be downloaded. |
MakeCode is a programming editor developed by Microsoft Research that allows both block-based and text-based programming of microcontrollers. The editor is expandable and scalable by adding extensions/packages, some of which are created by users.
Hardware Selection
To differentiate between the different Calliope mini versions (1, 2, or 3), there is the Hardware Selection. This selection ensures that the editor is optimally adapted to the Calliope mini. The hardware selection is made once when starting a new project or can be changed at any time with a button next to the download button.
Transfer Program
Download & Transfer to Calliope mini
MakeCode programs can be downloaded as a HEX file for all versions of the Calliope mini. The programs can be transferred to the MINI drive via Drag & Drop over USB and executed.
WebUSB Transfer Calliope mini V3 V1
WebUSB enables a direct connection between a Calliope mini and a web browser.
After a one-time pairing with the Calliope mini via WebUSB, programs are transferred directly to the Calliope mini. Additionally, data measured by the Calliope mini can be displayed live in the editor via WebUSB.
The following web browsers currently support WebUSB: Microsoft Edge, Google Chrome, Opera, Chromium.
When the program is transferred to the Calliope mini, the HEX files can no longer be read from the Calliope mini. Therefore, it is important to save the project separately. (see below)
Save and Import Programs
All Makecode projects are automatically saved online in the browser cache. However, this means that programs can disappear if, for example, the browser data is deleted or the cache is disabled. There are various ways to share and save programs:
locally as HEX file
The program can be saved as a HEX file on the computer and re-imported into the editor. The HEX file contains, in addition to the executable program, all other information about the arrangement of the blocks, comments, and settings from MakeCode.
via URL/QR Code
Programs can be easily shared via link. The URL is also output as a QR code. The shared programs can be edited via the link.
The link creates a copy of the shared program. This means that the original program is not changed.
Github
MakeCode offers the ability to save the program as a repository on Github, for example, to work on a project together. You can log in with a Github account and create and test programs, extensions, and tutorials.
A selection of videos on how to use MakeCode can be found here.
File Management on iPad
Existing programs can be reopened and further edited at any time within the app in the MakeCode editor. There are different variants available.
Save program in files on the iPad
Via the "Download" button, the program is transferred to the connected Calliope mini and also saved locally on the device.
The .Hex files are located in the folder Calliope mini under on my iPad.
All files in this folder can be managed via the app.
Import program via project URL
- Copy project URL to clipboard
- Calliope mini App: Open MakeCode homepage
- Open import and select URL
- Paste URL from clipboard, press Let's go and directly select the hardware.
Import program via QR code
- Scan QR code with the QR code scanner in the Calliope mini app.
- Open program via the green button open. Program opens in the Calliope mini app.
- Select edit and let's go.
- Don't forget to select hardware!
Simulator
The simulator offers the ability to test and simulate the program flow. The simulator display is supplemented depending on the program with sensors or input options. The simulator is linked to the Hardware Selection and a good indication of which Calliope mini version is currently being programmed. Inputs, outputs, or sensor data can be simulated via the simulator.
Jacdac in the Simulator Calliope mini V3
The simulator also considers externally connected sensors and actuators and can display live data when connected via the WebUSB interface. The Jacdac modules can be easily connected to the Calliope mini and are automatically recognized and displayed by the editor. For Grove sensors, corresponding extension packages (extensions: search term - Jacdac) are needed.
Debugger
With the debugger, which can be found under the simulator button, the program flow can be checked step by step for errors.
The current values of all variables in the program are displayed in the debugger to, for example, track the iterations of a loop.
Text-based Programming (Javascript/Python)
In Makecode, there is the option to convert block code into Python or Javascript code. This translation works both ways. You can change blocks in Javascript or Python and have them displayed again in block code.
This allows for the first steps into text-based programming or quickly copying blocks or exchanging and replacing them between different programs.
Serial Monitor
The MakeCode editor has an integrated serial monitor. This monitor can be called up via the "Show Data - Device" button under the simulator and displays the data in text form and graphically as a plot. The necessary blocks for programming are found in the "Serial" category in the advanced section. The output data can also be downloaded as a .CSV file. For the use of the serial monitor, a pairing via WebUSB is required.
Extensions
MakeCode offers the ability to create your own extensions and blocks that can be loaded into the editor by third parties. Thanks to the large community, new sensors, actuators, or other extensions are regularly added.
Extensions are saved in the exported Hex file. For a new project, extensions can be selected in Makecode or added as a Github URL!
More information on creating your own extensions can be found at Makecode Docs.
With the radio extension, data can be exchanged between multiple Calliope minis using the transmitter-receiver model. For example, one Calliope mini can function as a remote control for another.
The Grove extension offers a selection of various sensors and actuators that can be connected to one of the two Grove ports on the Calliope mini A1 or A0. These include the ultrasonic and humidity sensor, the 4-digit display, gesture recognition, UART Wifi, and the joystick.
The datalogger extension provides the ability to log, save, and evaluate data from the Calliope mini 3. The collected data can be viewed in an .htm file on the Calliope mini drive. More information can be found here.
The audio recording extension allows for sound recording via the integrated microphone on the Calliope mini 3. These recordings (about 3 seconds) can be played back, saved, or overwritten with a new recording via the speaker.
The Jacdac extension is for the use of the new Jacdac connectors on the Calliope mini 3. The extension allows for the configuration of individual sensors and actuators. When the Calliope mini is connected via WebUSB, MakeCode automatically recognizes the connected devices.
With the MakeCode update and the support of WebUSB, it is now possible to display sensor data directly live in the simulator. However, this requires custom-developed extensions, such as this CO2 sensor extension. You can recognize the extensions by "jacdac" in the name.
The power extension puts the Calliope mini 3 into a power-saving mode by optimizing and reducing certain processes. This extension is particularly useful for data logging or when powered by batteries. More information can be found here.
The Neopixel extension allows for simple as well as complex color programming of the three built-in RGB LEDs of the Calliope mini 3. Select the pin "RGB" during initialization and start right away. Otherwise, the extensions still work for external Neopixels.
additional Tools
Create Tutorials
There are many introductions and guides on the homepage to get started with programming the Calliope mini. You can also create and publish your own guides with the tutorial tool from MakeCode. The tutorials are written in the markup language "Markdown" and can be shared via link. To update a tutorial, it can also be created as a repository on Github. Detailed documentation can be found here or as PDF
Multi-Editor
With the multi-editor, two Calliope minis can be programmed differently in the same browser and the radio communication between both can be tested in the simulator.
More information on these and other useful tools for working with MakeCode can be found at makecode.com/tools.
Document and Comment
Comments
Comments can be added to the blocks or freely on the workspace as post-its.
This way, the program can be documented and understood for oneself or others.
Code Block Images
MakeCode offers the function to download high-resolution screenshots directly with a right-click as a .png.
Alternatively you can download images the the Block Images Tool, also in formats like svg:
Documentation and Help
When the question mark symbol in the top right corner of the editor is clicked and then blocks is clicked, a detailed documentation of the individual programming blocks opens. Alternatively, direct information about the block can also be retrieved by selecting it with a right-click and clicking on help.
The information is retrieved from the documentation, which can be found here:
Programming Concepts
Block-based Programming | Yes |
Text-based Programming | Javascript/Python |
Multithreading | Yes, multiple loops can be created in parallel |
Events (event-based programming) | Yes |
Variables | Yes |
Lists | Yes |
Loops: While / For / Foreach | Yes / Yes / Yes |
Functions / with Parameters / with Return Value | Yes / Yes (no lists) / Yes |
Serial Communication | Yes |
Sensors/Actuators Extensions | Yes, they can be added as an extension package |