In the previous post, I explained the advantages of MakeCode. Very promising tool, right? In this post, I will list the issues I meet when I “translate” the puppy demo project from LEGO programming blocks into MakeCode version. At the end of the post, I will give my personal opinion on this tool.
Difficult to debug and fine tune
Once I finish writing code in MakeCode, I need to click “Download” button to download the code to computer first. Please note, I could not download it to LEGO EV3 directly, which I feel is the most inconvenient point of MakeCode. When there is frequent update and fine tune for the program like this project, it is very troublesome to download and copy/paste file frequently.
Crash LEGO Programming software
Please note that using MakeCode will make LEGO Programming software crash. Therefore, if there are projects opened in LEGO Programming software, save them first.
Weird compiling error
When I finish coding Puppy demo project and then download it, there is a weird compiling error, as shown below. I could not find out any clue from MakeCode even though I have checked my code line by line.
Puppy demo is a bit complicated, so don’t ask me how I narrow down the problematic code when there is not any clue given by the workspace.
Finally, I pinpointed the error, which happened when I called this function of “get_color”. It is a very normal function, right? The block causing compiling error resulted from the code “play sound effect … until done”. Once I removed them, the compiling error disappeared and the file could be downloaded successfully. Later on, I checked the GitHub page, where people posted their issues of MakeCode. It seemed that others also encountered some mysterious compiling errors.
However, if you are just doing some simple coding in MakeCode, you might not be annoyed by this error.
Firmware Upgrade Issue
This issue once blocked me from moving forward and playing MakeCode, but finally it was solved, so just listed here for your reference.
In order to download the code successfully to LEGO EV3, the minimum version of LEGO EV3 firmware should be V1.10E or above.
Open MakeCode documentation and go to Troubleshoot page, then scroll to “Upgrade your EV3” section, you could see there are two methods to upgrade firmware.
However, the first method of using LEGO Programming software could not succeed. It will prompt that the firmware “EV3 Firmware V1.09E” is available, which is lower than V1.10E.
You need to use the second method – upgrade via EV3 device manager. Click the link “Upgrade with EV3 Device Manager” on the “Troubleshoot” page mentioned above and follow the guidance on the opened EV3 Device Manager page. Finally, the LEGO EV3 is upgraded.
After installing the latest firmware V1.10E, you need to reboot your EV3 and then check if you could find EV3 drive in the File Manager (I use Windows 10), and then copy the downloaded .uf2 file into EV3 project folder. Now the program will run automatically.
MakeCode has done great job in providing the coding blocks for LEGO MindStorms EV3. Those programming blocks are almost a complete match of blocks of LEGO Programming software. In terms of functionalities, MakeCode does much better than the LEGO EV3 extension to Scratch.
MakeCode also provided step-by-step tutorials, video clips and First LEGO League task introduction so as to cater to the players of different levels. The help documents are well prepared, although some newly added functions are lack of specification, but I believe it will be added later and should not be a big problem.
In my opinion, the biggest issue is just what I mentioned in the very beginning of the post. It is very troublesome to debug. No matter you change a rotation degree of the motor, or adjust the waiting time or any minor alternation, you have to download a new version of the code and then paste it to EV3 drive.
That means, once the code is downloaded to EV3, you could not check the value of sensors or motors through MakeCode. It is totally disconnected from MakeCode. If you want to check the value of sensors, motors or variables, the only interface is the brick screen. However, it is far from convenient to use screen. One problem is the super mini font but you could not change font size, another problem is the low contrast ratio of screen. Finally, just imaging you want to check the status of motors, sensors and variables at the same time, it is difficult to identify the needed information promptly.
Generally, if you just want to do some simple code in MakeCode, the above issues might not exist, and the block based language and the simulator are super suitable for primary school students. However, if you are a serious player, maybe you would just stick to LEGO programming software, or LEGO MicroPython.
Note: All the analysis articles are copyright products of http://www.thecodingfun.com. Anyone re-posting them should credit author and original source. Anyone using them for commercial purposes or translating them into other languages should notify TheCodingFun and get confirmation first. All Rights Reserved.