Using a Micro:bit with any MD product

A Micro:bit is a pocket-sized microcontroller that can be coded and utilized with Python and C. The Micro:bit has an LED display, programmable buttons, speaker, microphone, magnetometer, accelerometer; radio and Bluetooth transmitters and receivers as well as a range of input and output pins to let you connect the Micro:bit. All these features can be utilized in the real world, making the Micro:bit the perfect stepping stone into using software and hardware together.

All MD software products connect directly from the PC to the Micro:bit with a USB cable, this includes MD Python-Free. The Micro:bit is programmed using Python. Python is a versatile, free and easy to read, learn and write programming language. In MatDeck, Python can be programmed and executed in two ways which are:

  • Python blocks in a MatDeck document
  • MatDeck Python IDE

To run a Micro:bit Python program from a MD document or Python IDE, connect to the Micro:bit by a USB cable and click the Evaluate icon on the Programming Tab in any MD software. There is no need for any third-party applications as it is directly executed from the document to the Micro:bit.

Microbit Python in MD documents

Using a Micro:bit in a MatDeck document gives you unique solutions, this allows you to utilize Python code that can be mixed with: diagrams, flowcharts, 2D and 3D Graphs, a drag-and-drop GUI designer ( to create PC apps with a Micro:bit), Curve Interpolation and Approximation, Virtument (instrument panel), SCADA, popular databases, a mathematical formula editor, thousands of mathematical functions and countless other MD features.  To open a MD document, go to the File tab and click on the small arrow next to the New icon, and select New document.

The image below shows Eleven Python Block examples of how to use MatDeck with a Micro:bit, all in one file. Each example can be ran independently by highlighting the Python Block and clicking Deploy.

Python blocks in MD document
Python Blocks used in MD documents

MatDeck Python IDE

MatDeck Python IDE (Integrated Development Environment) contains: code completion, a code editor, numerous plugins and integration as well as other advanced IDE features. For lengthier and bigger projects, MatDeck Python IDE offers increased efficiency and reduced errors, however, it cannot be used in parallel with MD features. To open a Python IDE, go to the File tab and click on the small arrow next to the New icon, and select New Python.

MatDeck Python IDE
MatDeck Python IDE

This example shows how a Micro:bit can be used with chemistry tools, which are available with all MD products including MD Python-Free . Using the Micro:bits thermometer we were able to retrieve data on the temperature of the metal and water, with this data we were able to find the specific heat capacity of the unknown metal and from that find out what metal it was.

Micro:bit used with chemistry tools

Micro:bit has also been incorporated in MatDeck as an interactive toolbox which allows users to directly insert Micro:bit functions. This stops users from having to memorise countless functions and coding errors will be made scarce. More time will be spent on learning about programs instead of correcting errors.

micro:bit toolbox
micro:bit function drop down menu

Each group contains numerous functions that can be used and directly inserted into MD documents.

By doing so, MD users can save time spent on memorising functions and errors within the code will be reduced greatly.

Like other MD features, insertable micro:bit functions can be used and integrated with other functions such as the interactive MD periodic table below.

micro:bit main file example

Examples

micro:bit temperature virtument matdeck