Variable difference?


#1

Hello,

A few explain to me the difference between the variables in mBlock?
There is a new type of variable: Communicate

11


Add talk feature?
#2

Hi Crackel,
Communicate variable helps make codey interact with the stage.
Here is more introduction: http://docs-for-mk.readthedocs.io/en/latest/


#3

Thank you for the link.

Executes simultaneously really interesting.
Execute silmultaneously

Can the mBot do simultaneous execution?


#4

Wow, that’s an interesting idea.

Codey Rocky has a built-in multi-threading mechanism, while the processor (“Arduino” mega328p) has a much-limited capacity. I heard the latest library only support no more than 6 communication variables.

However, there are ways to implement multi-threading on Arduino (which also bring other issues), so I can’t say it is totally impossible. But such experiments will not begin before we finish IFTTT, better Neuron and Codey support, support earlier Makeblock products like Ultimate 2.0, and much more other critical work.

mBlock will release a great developer tool though, both for internal development and engaging with the community. Maybe some hackers may play around with Arduino multi-threading?

By the way, the product team is considering abandoning the “communication variable” idea - since users show difficulty in understanding this idea. Perhaps common global variable will be enough to pass between the computer and the hardware in the near future.


#5

Thank you for your answers. Indeed, I do not see the utility of passing a communication variable unless we can pass an object with properties. However, it is much less easy for children to understand. I trust you.