Implementation of Block-Based Programming for an Educational Device

31.10.2022

Digital technologies shape the modern world, change society, and without a doubt, affect the educational system. The market for educational programmable robots is constantly growing and will reach one billion dollars by 2027 [1]. This situation creates a significant demand for different educational digital devices and, thus, provides great opportunities for developer companies.

One of the requirements for a school programmable device is usability even for those who have no previous experience in coding. This goal can be successfully achieved by the substitution of the text-based coding process with a simpler approach. Programming blocks can be used instead of text lines. In this approach, multiple lines of text code are represented as one visual block. Thus, text-based programming is converted into a drag-and-drop process where different interlocking blocks can be combined to make a needed code.

Scratch and Blockly are the two most known examples of block-based programming languages. Scratch is designed by the MIT Media Lab almost 20 years ago specifically for educational purposes. Nowadays Scratch is the world’s largest coding community for children with over 95 million registered users [2]. Blockly is a Google project that provides the possibility to implement block-based code in JavaScript, Python, PHP, Lua, and Dart. One of Blockly’s features is a tool for building new custom blocks – Block Factory.

While Scratch creates applications that demand a connection established between the device and the computer, Blockly allows flashing apps to a device and applying the device with a standalone application. The latter approach provides much more opportunities to conduct classes:

  • students can interact with each other with the help of a programmed device, avoiding using a computer or smartphone;
  • classes can be conducted outside of the school building, as students don’t need computers to utilize an application flashed to the device.

To fulfill these requirements an educational device should be of a compact size which implies a significant constraint on a device’s resources. This leads to the necessity to run software that is suitable for such constrained resources. The combination of Zephyr real-time operating system and MicroPython can be considered as a possible solution.

Zephyr RTOS is designed for embedded devices and has very low system requirements along with a high level of security. MicroPython is an open-source software implementation of Python 3 optimized to be run directly on a microcontroller or on top of an operating system with constrained resources. Moreover, MicroPython has the Zephyr port that supports APIs for GPIO and sensors with several channels. All these features make MicroPython in combination with Zephyr RTOS a valid solution for further implementation of Blockly as block-based programming for an educational device.

To achieve this goal a Turku-based IT company AI2AI provides a prototype of its portative interactive sensor platform Pall0, which is operated under the control of Zephyr RTOS. The Zephyr port of MicroPython was successfully applied to Pall0 to utilize its APIs for block-based programming.

Block-based Integrated Platform for Embedded Systems (BIPES) was taken as a basis for Pall0’s block-based IDE, which can be accessed via Google Chrome and Microsoft Edge browsers. BIPES is an open-source project that implements the Blockly programming language and provides a block-based GUI, a console, as well as access to Python versions of running block-based code.

In order to complete the project, the following steps were performed:

  • the BIPES UI, as well as generic BIPES blocks, were significantly modified to meet Pall0’s requirements;
  • new programming blocks were made to utilize specific Pall0’s APIs.

Pall0 along with its block-based programming IDE was demonstrated as a potential educational device during several school classes in Turku and Helsinki in May 2022. All those classes were conducted without significant software problems on Windows OS as well as on iPadOS. Students could easily edit block codes that were made for Pall0 beforehand, as well as could create their own block codes utilizing Pall0’s features, proving that block-based coding is an easy approach to start studying programming.

References:

[1]         360iResearch. Programmable Robots for STEAM Learning Tools Market Research Report by Type (Primary Education and Secondary Education), Component, Region (Americas, Asia-Pacific, and Europe, Middle East & Africa) – Global Forecast to 2027 – Cumulative Impact of COVID-19 [Online]. MarketResearch.com; Apr. 2022. Available from: https://www.marketresearch.com/360iResearch-v4164/Programmable-Robots-STEAM-Learning-Tools-31205813/ [Accessed 19 September 2022].

[2]         Community statistics at a glance [Online]. Scratch; 2022. Available from: https://scratch.mit.edu/statistics [Accessed 19 September 2022].