Programming has become a fundamental skill that young people today need to master. When it comes to coding, most people might think of images like this:
Or something like this:
Like this:
And even this:
Actually, programming can also look like this:
That’s right, graphical programming. Currently, there are quite a few graphical programming tools available. From this section onwards, I will lead everyone on a journey based on the Mixly graphical programming tool.
The following content comes from the official technical documentation of Mixly:
https://mixly.readthedocs.io/zh_CN/latest/basic/01Mixly_introduction.html
Introduction to Mixly
Mixly is a graphical programming software. Users can write programs by piecing together blocks. So far, Mixly has supported programming languages such as Arduino, MicroPython, and Python.
Overview
Mixly was developed by a team led by Teacher Fu Qian, head of the Maker Education Laboratory at Beijing Normal University. It is a domestically developed and free open-source graphical programming tool. In the wave of maker education both domestically and internationally, Teacher Fu carefully analyzed the current maker education in the electronics field and believed that “if we cannot provide students with a sufficiently simple tool, teachers with an easy-to-use tool, and manufacturers with a sufficiently autonomous programming tool, the so-called ‘creation’ will only remain a superficial cloud that dissipates with the wind.” To vigorously implement the educational philosophy of the maker laboratory of ‘independent practice, sharing happiness’, Teacher Fu and his team developed Mixly, which features usability, simplicity, functionality, universality, continuity, and ecological characteristics.
Features
Usability
Currently, most primary and secondary school computer rooms have hard disk protection cards, and frequent software installations and updates create great inconvenience for management. Therefore, Mixly has been designed for completely green use. Users can directly download the Mixly software package from the internet, unzip it, and run it on Windows XP and above operating systems. The software does not require an additional browser installation or Java runtime environment, greatly facilitating the use for teachers and students.
Simplicity
Mixly uses the Blockly graphical programming engine, replacing complex text operations with graphical blocks, laying a good foundation for students to quickly get started. Additionally, the development team of Mixly uses the following methods to help teachers and students quickly familiarize themselves with the software: first, using different colored icons to represent different types of functional blocks for easy classification; second, providing default options in composite functional blocks to effectively reduce the number of drag operations for users; third, integrating all software functions in the same interface; fourth, providing reference tutorials and code examples.
Functionality
Currently, many schools organize or participate in maker competitions as a means of maker education, and the competitive nature of the competitions places higher demands on software functionality. Therefore, Mixly strives to maintain consistency with the text programming of Arduino IDE in its functionality design. The latest version, Mixly 0.97, has achieved all official functions of Arduino (including interrupt handling) and has added a large number of third-party extension library functions, such as infrared remote control and ultrasonic, to ensure both course offerings and various maker competition requirements.
Universality
Mixly has been designed with absolute universality in mind. First, for all development boards officially supported by Arduino, Mixly provides perfect support: it will automatically change the pin numbers, interrupt numbers, and analog output pins in the module according to the type of development board; second, for third-party development boards supported by Arduino, Mixly also supports them. Users only need to copy the definitions of the corresponding development boards into Mixly. For example, many ESP8266 development boards in the country, various user-modified development boards, etc., to ensure maximum freedom of choice for users in selecting development boards.
Continuity
The goal of the graphical programming system is definitely not to replace the existing text programming method, but to help students better and faster understand the principles of programming and the thinking of programs through graphical programming, laying a good foundation for future text programming. The design concept of Mixly is also like this. More continuity content has been added to the software design to protect users’ learning outcomes. Specifically, this includes introducing variable types, maintaining consistency with text programming in module design, and supporting the comparison between graphical programming and text programming.
Ecologicality
Ecologicality is the most important design concept of Mixly and is also its most distinguishing feature from other Arduino graphical programming tools. To achieve sustainable development of Mixly, its design allows manufacturers to develop their own unique modules (currently supporting DfRobot, StartLab, MakeBlock, Sense, Seeed, Lubot, Microduino, Ruilong, NodeMcu, Nova; users need to have a JavaScript programming background to create this part of the module), and also allows users to directly use the graphical programming function of Mixly to generate general modules (such as digital tube display, buzzer sound playback, etc.; users only need to be able to use Mixly to create this part of the module). Both types of modules can be imported into the Mixly system through the “Import Library” function, thereby realizing the users’ own value in the popularization of Mixly.
Software Installation and Update
The latest version is 1.0.0, supporting Windows 7/8/10, MacOS, and Linux (non-arm framework).
Download Software
-
【Recommendation 1】
-
【Recommendation 2】
-
【Recommendation】
Windows Version Installation
Install Software
Download the Mixly_WIN.7z compressed package, right-click to unzip it to the local disk.
Note
-
It is recommended to unzip to the root directory of the hard drive, and the path cannot contain Chinese and special characters (such as: . _ ( ) etc.).
-
It is recommended to install in a path like E:Mixly
The directory after unzipping is shown in the figure.
The first time you unzip, the software only contains the most basic files and cannot be run directly. You need to run the one-click update.bat or update.bat to download the latest version of the Mixly software.
After a moment, the update progress will be displayed.
When you see the prompt “Mixly update completed”, it means that the software has been downloaded.
After the update is completed, the software directory is shown in the figure, and you can double-click Mixly.exe to open the Mixly software.
Update Software
The update of Mixly software is designed based on git. Each update will automatically compare the differences between the latest version and the version used by the user, only updating the difference files to avoid version confusion caused by repeated downloads.
First, close the Mixly software, then run the one-click update.bat or update.bat to start the update program.
After a moment, the update will be complete.
Driver Installation
To connect the development board to the computer for communication, you need to install the corresponding serial chip driver. Common serial chip drivers include CH340 and CP2102. You can find these two serial chip drivers in the arduino/drivers directory.
Choose the corresponding driver based on the serial chip of the development board you are using. If you are unsure which serial chip it is, you can also install both drivers.
Start Software
Double-click Mixly.exe to start the Mixly software.
Mac Version Installation
Unzip Software
Download the jre-8u221-macosx-x64.dmg Java installation package and install it by default according to the prompts.
Download the Mixly1.0_MAC.zip compressed package, right-click to unzip it to the local disk.
The directory after unzipping is shown in the figure.
1. MAC must install JDK8, and only JDK8 can be installed; higher versions of JAVA will not work. You can directly use the JDK that comes with the cloud disk. 2. You need to install the corresponding open-source hardware drivers, commonly the cp210x driver and ch34x driver that come with the cloud disk. 3. You need to install python3 by yourself (the installation package is in the cloud disk). 4. After installing python3, run the following command line operations
1 2 3 4 5 6 7 |
sudo xcode-select –install ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” brew install portaudio pip3 install pyaudio brew install opencv pip3 install opencv-python pip3 install baidu-aip matplotlib pandas numpy |
5. After unzipping Mixly, double-click Mixly.jar to use it.
Driver Installation
To connect the development board to the computer for communication, you need to install the corresponding serial chip driver. Common serial chip drivers include CH340 and CP2102. You can find these two serial chip drivers in the Mixly/drivers directory.
Choose the corresponding driver based on the serial chip of the development board you are using. If you are unsure which serial chip it is, you can also install both drivers.
Start Software
Double-click Mixly.jar to start the Mixly software.
Update Software
The update of Mixly software is designed based on git. Each update will automatically compare the differences between the latest version and the version used by the user, only updating the difference files to avoid version confusion caused by repeated downloads.
First, close the Mixly software. Open the terminal and use the cd command to enter the directory where the Mixly software is located (after entering cd, you can drag the Mixly folder into the terminal window).
Enter the update commands in order:
1 2 3 |
git add * git stash git pull origin master |
After a moment, you can see the update files are completed.
Interface Introduction
Mixly software is mainly divided into the graphical program selection area, graphical program editing area, code preview area, system function area, and message prompt area.
Graphical Program Selection Area
The graphical program selection area contains various graphical programs, each category containing multiple graphical options. By dragging these graphical blocks into the graphical program editing area, programming can be completed.
Program Editing Area
In this area, we usually drag code blocks that can perform certain functions to connect them.
Program Deletion
-
Drag unnecessary code to the bottom right trash can.
-
Drag unused code back to the leftmost graphical program selection area.
-
Select unused code and press the Delete or Backspace key on the keyboard.
Program Zoom
There are zoom buttons above the trash can in the bottom right corner.
-
The first button normalizes the size of the graphical blocks and centers them.
-
The second button enlarges the graphical blocks.
-
The third button shrinks the graphical blocks.
Of course, you can also directly use the mouse wheel to zoom.
Program Organization
When the written program is relatively large, it needs to be organized.
Right-click in the blank area and select clean blocks.
Note
Organization can only be performed when there are multiple separate blocks.
Program Copy
-
Right-click on the graphical block and select copy, which will generate an identical block, but this method can only copy one block.
-
First, drag multiple blocks with the mouse, then press Ctrl+C and Ctrl+V to copy multiple blocks.
Language Switching
In the upper right corner of this area, you can also select the type of language.
As of now, Mixly supports English, Spanish, Simplified Chinese, and Traditional Chinese.
Undo and Redo
To the left of the language selection, there are two arrows, which are undo (Ctrl + Z) and redo (Ctrl + Y).
The undo function allows you to recover mistakenly deleted code by clicking the left arrow or directly pressing Ctrl + Z.
The redo function is the opposite of Ctrl + Z; it restores the previous operation, which can also be achieved by clicking the right arrow or directly typing Ctrl + Y.
Help Document
On the left side of the language selection, the ? icon is the link to the help document. Clicking this icon will open the help document.
Code Preview Area
This area can be shown or hidden by clicking the dark gray arrow on the right.
In the code editing area, corresponding code will be generated after dragging graphical blocks from the graphical program selection area. This can help users master code learning.
Note
Code cannot be edited directly in this area; you need to click the code button in the upper left corner of the graphical program selection area to edit.
Message Prompt Area
The message prompt area usually serves as a feedback place for students. For example, during compilation or upload processes, whether the compilation or upload was successful, what the failure reason was; or whether the library import was successful, etc.
System Function Area
The system function area mainly executes functions such as new, open, save, save as, export library, import library, manage library, compile, upload, select main control board model and port, serial port monitor, and zooming in and out of the software interface.
General Functions
The general functions of Mixly include new, open, save, and save as, where the format for saving or saving as code is .mix or .ino.
When users need to open a saved file, they can first open the Mixly software, then click “Open” to find the *.mix file. They can also directly double-click the *.mix file to open it.
Library Functions
To facilitate user usage and code sharing, Mixly has added library functions. Library functions include: export library, import library, and manage library. After users have written a piece of code (for example, voice playback), they can integrate this code into a function (let’s assume this function is called sayNum). After that, they only need to click export library and give the library a name to use.
After saving, this library can be uploaded to the platform for others to download and use for learning.
When someone downloads this code, they can directly import this library and use it. Click import library to find the location of the file.
After importing, the interface will refresh. Wait patiently for 1-2 seconds, and you will see the newly imported library in the module selection area. At the same time, the message prompt area will also indicate “Import custom library successful!” Then you can directly click the sayNum library, drag the command into the program construction area, and call the function.
The manage library function allows you to rename, delete, and open the directory of the imported library.
Compile & Upload
When users have finished writing code, if they want to check whether there are any logical errors in the code, they can click compile.
If it shows “Compilation failed”, then they need to check their code according to the prompt. If it shows “Compilation successful”, it means that there are no logical errors in the code, and it can be uploaded.
If “Upload failed” appears, in most cases, unplugging and plugging the USB cable can solve the problem.
If “Upload successful” appears, it means the code has been uploaded to the board. Of course, if the user is confident in the code logic, they can directly click the upload button.
Main Board & Port
When users click the dropdown triangle under the main control board, they can see many main control board models to choose from. Users need to select according to the main control board model they have.
Note
Before starting to program, the board must be selected. Switching the board after writing the program will result in loss of the program.
After selecting the board, you also need to select the corresponding port number for that board. The port number is the channel for communication between the computer and the board.
Serial Monitor
The serial monitor is used together with the serial communication commands in the module selection area. It can be used to output variables, sensor values, etc.
Interface Zoom
On the right side of the serial monitor, there is a button that can be dragged left and right, which can enlarge or shrink the entire Mixly interface size.
Unlike the zooming in and out of the program construction area (this button can only enlarge or shrink the size of the code in the program construction area), dragging to zoom the interface can enlarge all areas of the Mixly software except the message prompt area.
Supported Boards
From a linguistic perspective, Mixly currently supports three languages: Arduino, MicroPython, and Python. When we start using Mixly to write programs, we need to select the correct board in the lower right corner of the Mixly software.
Arduino Boards
This category uses Arduino programming and supports the following boards:
-
Arduino/Genuino Uno
-
Arduino Nano
-
Arduino/Genuino Mega or Mega 2560
-
Arduino Leonardo
-
Generic ESP8266 Module
-
NodeMCU 1.0 (ESP-12E Module)
-
LOLIN(WEMOS) D1 R2 & mini
-
WeMos D1 R1
-
ESP32 Dev Module
-
Arduino MixGo
-
Arduino HandBit
-
Arduino MixePi
MicroPython Boards
This category uses MicroPython programming and supports the following boards.
-
MicroPython[ESP32_Generic]
-
MicroPython[ESP32_HandBit]
-
MicroPython[ESP32_MixGo]
-
MicroPython[NRF51822_microbit]
Python
Pure Python programming, no development board is required.
-
mixpy