Our mBlock 5 Extensions:
The programming environment named mBlock 5 seems to us to be an interesting tool for teaching programming and for programming the Arduino module.
Many measuring and control modules can be connected to the Arduino module. Different libraries are needed for these peripherals. It is possible to create a new command extension for the mBlock environment. This is a way to easily extend mBlock with new libraries for the Arduino module and its peripherals.
So we thought we'd try it too… 🙂
Our Extensions for the mBlock 5
PinAout is a simple extension with one command
Set pin output [A0–A5] as [low/high]. The purpose of this command is to set pins
A0–A5 as a digital output and to set the output digital value (
This was our first extension to learn us how to create an extension for mBlock 5
Funduino-LED-Segment extension adds a function for controlling the LED segment displays of the Multifunction Shield (named Funduino). You can display ready characters or the value occupied in a variable on any LED display.
It is also possible to switch on individual LED segments of displays. The Funduino module has only one LATCH for 4 LED segment displays – the display must be periodically refreshed!
sensor BMP180 (Barometric, Temperature and Altitude sensor). The Extension contains commands for initializing the sensor, load temperature, load barometric pressure and altitude (in several user selectable units). Sensor-Arduino connection (for I²C interface Arduino UNO):
SDA – pin
SCL – pin
GND – ground pin and
VIN – pin
+5V (if 3V3-regulator is in the sensor included!)
Ethernet-Shield (Ethernet Shield allows an Arduino board to connect to the Internet). This extension is designed to work with the Arduino Ethernet Shield and any other W5100/W5200/W5500-based devices. The extension contains blocks for creating a simple server and a simple web client. Version 0.0.3 increases the efficiency of packet transmission and thus reduces the response time for the server.
Texts to Flash extension helps spare the space of RAM memory (of the Arduino module) occupied by texts as global variables. The String to be printed is normally saved in RAM. If your sketch prints a lot of texts, you can easily fill the RAM. If you have free FLASH memory space, you can the string must be saved in FLASH.
Extension for Arduino and teaching
MAXI Starter Kit. This extension contains functions and procedures to support all modules of the MAXI Starter Kit. With this kit, you can easily create all the lessons from the tutorial for this Arduino-kit in mBlock.
This extension adds a command block to the mBlock environment to generate at least "quite" random number. The standard
Random() function for the Arduino module generates pseudo random numbers. In real life we need to generate at least "quite" random numbers, for example, to play games.