No one is perfect, let’s make this clear. We love robots and programming, but the harsh truth is that each and every one of them has certain flaws that us users just have to accept.
The programming app for MINDSTORMS EV3, the EV3 Classroom, is no different.
This software also has several bugs that can be tricky to overcome, especially if you are just starting to program the MINDSTORMS EV3 kit. To help you solve this problem, our team took a closer look at 5 common bugs you can come across in EV3 Classroom, and delivers easy solutions.
- When reporter blocks fail to report
- Bizarre degree values on display
- Bluetooth connection issues
- Timer does not equal time
- My blocks limited to numeric inputs
This article concentrates on errors found in EV3 Classroom word blocks only. If you want to find out what EV3 Classroom is, or who and what it is for, read this article first.
When reporter blocks fail to report¶
Whenever you want to use a predefined value as input for a block in your program, you rely on the foolproof reporter blocks. Like their name implies, they report a certain value, most often numbers. To recognize them, simply look at the shape of the word block – if it has rounded corners and cannot be stacked on its own, it’s a reporter block. Look for them in the Variables, Sensors, or Motors categories.
Unfortunately, not all reporter blocks in EV3 Classroom work as intended. When placed directly in another stack block as input, sometimes reporter blocks just… malfunction. And cause errors.
This may be an unforeseen consequence of switching from Data Wires (EV3 Lab) to reporter blocks (EV3 Classroom), as means of relaying data from one part of the program to another.
Consider this example. In the EV3 Classroom program above, the degrees counted of motor B (the block delivers the number of degrees that the motor has turned) is used as the input value for the speed of motor A. This program will not work as you’d expect. Instead of activating motor A, this line unexpectedly activates motor B, despite no explicit command to do so.
How to fix this bug?
Easy fix: Variables¶
Although the straightforward approach fails with some reporter blocks in EV3 Classroom app, it does not mean you must stop using them. There is a universal workaround you can use to save your program.
If placing a reporter block directly in a stack block results in an error, transfer the data of the reporter block to a new variable first. Simply create a new variable, set its value to the reporter block value with the set variable to block, then use the variable block instead and voila! Seems a bit extra, but it works.
Here’s how to fix the script fragment mentioned above by using this method.
Bizarre degree values on display¶
The next bug has the potential to cause a small panic attack, especially if you ever worried about any technical issues with your EV3 Brick. The good news is it’s not as daunting once you understand what’s going on.
When you display the degrees counted from one of the motors on the screen of your EV3 Brick, after a while you will notice unusual readings. In just one motor rotation, incredible values such as -450, or 9000, can start showing up, hinting that your motor might have entered into another dimension.
Obviously, this is a bug. Let’s see what it’s all about.
Easy fix: Compare with dashboard¶
Although breaching a new dimension would be thrilling, these huge numbers are most probably caused by the degree symbol, which sometimes appears as additional zeroes on the display.
The easiest way to deal with this bug is to compare the readings displayed on the Brick with those visible in Dashboard in EV3 Classroom app. Since this bug affects only the display, you can safely use the degrees counted as input data in your script. Its value will equal numbers shown in the Dashboard.
You can also use the table below for reference.
Another way to approach this issue is to display a set of graphics instead of exact numbers on the screen of the Brick.
However, it’s considerably more challenging. This method involves mathematical operations, like division, multiplication and rounding up the values, in order to match the motor readings to the conditional statements that display the graphics.
If you want to know how to do it step by step, head to our e-learning platform and select the Wind Turbine robot programmed in EV3 Classroom. In this lesson, students use Progress / Dial graphics to show the motor speed on the display.
Bluetooth connection issues¶
Wireless connection in robots can be inspiring and effective, on the condition that it works. That may not always be the case when you’re programming MINDSTORMS EV3 robots in EV3 Classroom.
Experiences of our testers were mixed. Some managed to connect the Brick to the new app with no issues in record time, but they were in the minority. Most encountered problems ranging from longer connection time to not being able to connect at all, despite several attempts. The tests were conducted on various devices with different operating systems, so we cannot pinpoint just one evident cause.
Fortunately, everyone was able to program their robots in the end. How?
Easy fix: Switch to cable¶
All thanks to the age-old foolproof trick known to all MINDSTORMS veterans. Just connect the EV3 Brick to your computer via a USB cable.
Not only does it work, it may actually prove to be the quickest way to connect your robot to the programming app, especially if you’re using robots at school.
Remember that your robot does not have to be connected at all times, just to upload the program. EV3 robots have the option to activate the uploaded program directly from the Brick.
Timer does not equal time¶
What is the time? According to the EV3 Classroom, it is all relative.
You see, if you ask a program created in EV3 Classroom to react when exactly 5 seconds pass, you may end up waiting forever and a day. The moment may never come, possibly because the timer has a tough time recognizing (and reacting to) the exact moment when precisely 5 seconds, not a millisecond more, not a millisecond less, pass in real time.
This absolute thinking does not align with the human perception of time, but we can reach a common understanding in the script.
Easy fix: Use > instead¶
Since the timer has a problem pinpointing an exact value, let’s make this a bit easier for the computer. Instead of the equal operator block (=), use greater than (>). This tiny change gives the program some leeway, enough to notice the passing of time and to react.
In terms of the outcome, you will achieve the same thing you wanted in the first place, except this program will actually work in the EV3 Classroom.
My blocks limited to numeric inputs¶
Finally, let’s take on the mighty and daunting My Blocks. Crafting your own word block is a powerful feature, especially since it can fill the gaps after some of the blocks that were removed in the new app.
The process is now easier to grasp than it used to be. To create your own word block, you must first design its profile with inputs (text, number, boolean) or labels, then define its function by creating a script from the blocks that already exist. By the end, you will have a neat new block to use in your program.
However, one flaw of this system is defining port connections. By default, motors are connected to ports marked by letters, but not all inputs take letters as values.
Is there a way to overcome this problem?
Hidden numeric values of Reporter blocks¶
Yes! You see, although the programming app shows data in various forms, e.g. text, pictures, or colors, deep down they are actually all numbers. For example, the colors detected by the Color Sensor are coded as follows:
- 0 = No Colour
- 1 = Black
- 2 = Blue
- 3 = Green
- 4 = Yellow
- 5 = Red
- 6 = White
- 7 = Brown
You can also use numbers to control individual Brick buttons. Specify the button you have in mind:
- 0 = No Button
- 1 = Left Button
- 2 = Center Button
- 3 = Right Button
- 4 = Up Button
- 5 = Down Button
Then decide whether it should be...
- 0 = Released
- 1 = Pressed
- 2 = Bumped
Those are just a few examples taken from the official user help files. A fraction of them can be found in the Help section of EV3 Classroom. But if you want to dive deeper, head to the elaborate official LEGO® MINDSTORMS® EV3 Help. Or check the solution below.
Easy fix: Our table¶
The same numbers trick can be applied in My Blocks to define the motor port. If you cannot use letters, don’t fight the system needlessly. Use one of these numbers instead!
The port input is numeric, with the following values:
Speaking of motors, do you know the easiest way to switch the direction of motor rotation?
Add an inconspicuous minus sign right in front of the numeric speed value. It will contradict the current direction (e.g. clockwise) and make the motor rotate in the other one (e.g. counterclockwise). Just watch out how many minuses you use, because in EV3 software two nos equal yes!