Use mBot with App Inventor (V1.9)

MIT App Inventor is a drag-and-drop block-based editor which can make Android Apps. You can use App Inventor to control mBots through an extension.

This document is available in a .docx document.


What’s new in Version 1.9

  • Uses Bluetooth 4.0 (BLE), which simplifies the connecting experience. Now you may connect your mBot with even only one button.
  • Added support for 9g mini servo
  • Now sensor values are read through events, easier for programming.

Add the mBot Extension to MIT App Inventor

MIT App Inventor is a drag-and-drop block-based editor which can make Android Apps. You can use App Inventor to control mBots through an extension.

Step 1. Go to MIT App Inventor’s website; create or open a project.

Step 2. In the Extension category of the Palette, click Import Extension. And switch to the URL tab in the opening dialog box.


Step 3. Paste the following link to the text box, and click Import.


Step 4. Click OK in the Rename extension dialog.



Step 5. Now you can see mBot in the Extension category. Drag it onto your phone screen.



Connect to a mBot with your Android App

Whenever you want to connect the robot, use the Connect to robot block.

Your phone will start searching for the nearest robot and connect it if close enough.

If you run “Connect to robot” block again, the phone will close the previous connections and try to connect again.

If you cannot connect the robot, please check: 1. Whether Bluetooth on the phone is enabled; 2. Whether the robot’s power is on. And of course, your phone needs to support Bluetooth 4.0.


Issue commands to your robot

After the robot is connected, commands regarding to motors, lights, sound and servos become available.

Here is an example of telling the robot to move forward when the button is clicked:


Read Sensor Values

In version 1.9, you need to “open” a sensor first, then use the sensor values in “received sensor value” blocks.


For example, the following blocks “open” the ultrasonic sensor when the mBot is connected:


Then you can use the sensor value in the “when mBot receive ultrasonic value” block. This is an example of obstacle avoidance:

List of Blocks

See the doc document


6 thoughts on “Use mBot with App Inventor (V1.9)”

  1. Hi,

    I’m a new user. I have an inventor Kit. I would like just to test all the functions available using Mit App inventor.
    The starter extension is setup and the bluetooth connexion is working.

    I just try this function in the App inventor side.
    starter1.DisplayNumberOn7Segments (Port 6, Number 999). I saw that something is received on my Orion board.
    My question is how can I manage this function in my orion board.
    Do you have an example for Orion board inventor Kit working with Mit App Inventor.



  2. Hi,
    I have the mbot and I bought some new sensors. While I can easily use them with the scratch-like environment, the extension on app inventor does not support them and I have no way on using them for my app. Mbot ranger and the other extensions do not work. Is there something I can do?

    Thank you,

  3. Hello,
    I purchased Invetor Electronic Kit (With Me Orion Board) How can I use App Invetor to check my card?
    Thank you

    1. Dear Luca,
      Our technical support crew has replied you via e-mail. Please kindly check it.
      Best regards,

Leave a Reply

Your email address will not be published. Required fields are marked *