Skip to content

The tool’s interface below is still in French.

From mBlock blocks to Arduino code

Every mBot block has a C++ equivalent. Search for a block, tick the ones you want, copy the program.

Programme avec les blocs cochés


            

Passer au code, en pratique

  1. Dans mBlock, basculez l’appareil en mode « Téléverser » : un panneau affiche le code Arduino généré à partir de vos blocs.
  2. Dans le logiciel Arduino, installez la bibliothèque Makeblock (fichier ZIP à ajouter par Croquis › Inclure une bibliothèque).
  3. Choisissez la carte « Arduino Uno » : la carte mCore du mBot repose sur le même microcontrôleur.
  4. Structure d’un programme : setup() s’exécute une fois au démarrage, loop() se répète sans fin, comme un bloc « répéter indéfiniment ».
  5. Pour revenir aux blocs, il faut remettre le micrologiciel d’origine depuis mBlock (Mettre à jour le micrologiciel).

Les libellés des blocs peuvent varier légèrement d’une version de mBlock à l’autre ; les instructions C++ sont celles de la bibliothèque Makeblock pour la carte mCore.

How it works

How to use the mBlock to Arduino lookup table

For each mBot block, the equivalent C++ instruction with the Makeblock library, and a complete program to put together.

  1. Search for a block

    By keyword or category.

  2. Tick the blocks you need

    The program builds up.

  3. Copy the code

    Or download the file.

FreeNo subscription, no hidden limits.
No sign-upOpen the page and use the tool. That’s it.
InstantResults in seconds, on mobile too.
PrivateEverything runs in your browser.

About the mBlock to Arduino lookup table

Going from blocks to text is a key step in learning: the structure stays the same, only the writing changes. “Forever” becomes the loop() function.

Each line explains why the instruction is there, for example the inverted sign of the left motor.

mblock to arduino makeblock library program mbot in c++ mblock arduino code mbot arduino ide mcore arduino code mbot code equivalents
FAQ

Frequently asked questions about the mBlock to Arduino lookup table

Which board should I pick in the Arduino software?

Arduino Uno: the mCore board uses the same microcontroller.

How do I go back to blocks?

By restoring the original firmware from mBlock.

Are the blocks identical to those in mBlock?

Labels may differ slightly depending on the mBlock version; the logic and the Arduino code stay the same.

Esc
↑ ↓ navigateEnter open