mBlock 5: Arduino-programming in the former "mBlock-3-mode"


Hello everybody,
I am a German STEM-teacher using mBlock already for a very long time. Thanks for this great software.

Before I switch from mBlock 3 to mBlock 5: Together with my students I realize physical computing-projects using the mBlock-stage i.e. as a control panel to control DC-motors of a crane, the servo motors of a robot arm or to react in mBlock-/scratch-programs on sensor-values (light, temperature, …)
I was not able to find out how this works with mBlock 5. I tried to declare global variables in both the Arduino-script and the mBlock-script. But this didn’t work. Can you help me with this?
Thanks in advance,


Hello Dieter_Schmidt,
Would you please show us the codes in mBlock 3, as well as your robot performance? You may post video here or send to my email box: stephanie.wu@makeblock.com. Thank you!


Hello Stephanie,
I uploaded three examples because this issue maybe interesting to other folks in the forum.

Example 1: Simple AnalogRead of a potentiometer
Example 2: We use a cheap Joystick to control game-sprites (2 potentiometers and 1 switch)
Example 3: Two DC-motors are controlled in direction (forward / backward) and speed (PWM) with a L293D-drivechip.

I hope that this is enough explanation.
Thanks for helping me,

1-AnalogRead_Potentiometer.sb2 (72.9 KB)
3-Controlpanel PWM-controlling two DCs by L293-mM.sb2 (302.5 KB)
2-Joystick_Example.sb2 (209.4 KB)


Hi again,
I’m not at school (vacation time :grinning:) - that’s why I cannot add any videos,


one additional remark: If I add the mBot there is the “live-mode”. In this mode I can use the mBot-bricks as well as the other bricks. For the Arduino Uno these “live-mode” does not exist. Will this option be possible in the near future?
Best wishes


There is no plan to add this live mode feature for Arduino Uno board. You may try Upload mode broadcast.


Hi, I uploaded the “Upload Mode Broadcast”, but nothing happens. When I switch to the Python Code it says “# not implemented, yet” …
Thanks for a comment in advance,


I was false. It works if I use the “when receiving upload mode message “message””-hat-block it works. If I use the upload-mode-message-value-reporter-block there is the “# not implemented, yet”-message and nothing happens.
I will continue with this experience.

One comment: it will probably be easy to send messages to the Arduino, both digital and analog. But I guess that it will be difficult to process AnalogRead-messages of several AnalogInpus?!?
Thanks again for an answer,