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
1. pinAout
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 (HIGH
/LOW
).
This was our first extension to learn us how to create an extension for mBlock 5
pinAout
– description and example of using »
2. Funduino LED Segment
The 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!
Funduino LED Segment
– description and example of using »
3. Sensor BMP180
Extension for 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 A4
, SCL
– pin A5
, GND
– ground pin and VIN
– pin +3V3
or +5V
(if 3V3-regulator is in the sensor included!)
Sensor BMP180
– description and example of using »
4. Ethernet Shield
Extension for 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.
Ethernet Shield
– description and example of using »
5. Texts to Flash
The 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.
Texts to Flash
– description and example of using »
6. MAXI Starter Kit
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.
MAXI Starter Kit
– description and example of using »
7. Quite-Random
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.