Variables lost in code translation on mBot 5.0.0-RC3 on Windows 10 [SOLVED]


#1

When I create a variable, it does not show upon the generated Arduino code. Already this minimal code, as can be seen in this screenshot, shows the problem:

In this example I use an mBot and its on-board RGB leds, but the same problem arises with any other outputs.

Setting variables (‘Set my_value to 0’) does show up in code.

I use mBot, mBlock 5.0.0-RC3 on Windows 10, I’ve downloaded mBlock 5 today and updated all firmware today. I also added the ‘Makers Platform’ extensions, maybe that the culprit is in there.I think approximately two weeks ago, everything still worked fine.

Note that on Codey everything works fine:

I am happy to help answer some more questions!

Good luck fixing it :+1: !


#2

Hi,
I have the same issue. To make a long story short, we give robotics and programming classes. One of our modules that used to work fine a few days ago, stopped working with the new RC3 version. After investigation, I have realized that variables used in blocks are not generated in the Arduino C code.


#3

It works in my side:
Uploading…
Have you seen any download icon when you select “mBot” from the device list? If yes, please click on it to update the device list.


#4

Blimey, missed that one! Thanks tech support, everything works again as it should! Issue solved!


#5

Works for me too! Wasn’t easy to see…


#6

Anyway, congratulations.