Xtreme STEM
DashX

RoboBloX

 

mBlock

mBlock can run in two different modes:

Live (Normal) Mode Arduino Mode
Your Laptop is in charge, and running the show. Your Robot is in charge, and running the show, with no need for your laptop.

A program called Firmware is loaded into your BrainBlock.

This teaches the Arduino how to communicate with mBlock.

The firmware program is always running. It sits listening for any commands sent by mBlock over the USB cable. As soon as a command is recieved the Arduino executes it.

For example: you click on a sprite to turn on an LED in your BlinkBlock. As soon as you click the sprite mBlock send a command to the Arduino, it tells it which pin to switch and whether it should turn it on or off.

mBlock will help create a program that will be loaded into your Arduino.

You can teach your robot how to do anything, and once you upload your program it will stay in the Arduino (until you upload something else).

Once your new program is loaded your robot will no longer listen to mBlock.

 

Great for testing and learning
Easy debugging
More powerful and faster.
Difficult to debug
Changes are instant Requires you upload your whole program each time you make any changes.
Laptop connection required No laptop connection required

You can cause things to happen with various events such as:

Events

No Events

Arduino

Things happen as soon as you click on them.
Your whole program starts as soon as the BrainBlock powers on
Needs a USB cable connected from your Laptop to your BrainBlock No cables required
(as long as the BrainBlock has power)
You can use a PowerBlock to free your robot from cables

 

 

Switching to Arduino Mode

  1. mBlock
    Click Edit -> Arduino Mode
  2. Arduino Mode
    You should see the stage dissapear
    and the code panel appear
  3. Arduino Mode Example Program

    Example
    All Arduino programs MUST start with an "Arduino Program" Block
    After that place anything you want your robot to do once when it first starts
    Finally you can place anything you want to do forever in a forever block
  4. mblock

    mb
    Make sure you are connected

  5. upload
    Click the Upload to Arduino
  6. Uploading will take a while
    About 30 seconds on a fast computer
    It may take a couple of minutes on some computers

    mblock
  7. Wait until you see the Upload Finished Message
    mblock
  8. Arduino
    Your program will start running as soon as the upload has finished
  9. BrainBlock
    To restart your program you can press the tiny reset button on your Arduino
  10.  

Switching back to Live (Normal) Mode

  1. mBlock
    Click Edit -> Arduino Mode
    It will uncheck
  2. mblock

    mb
    Make sure you are connected

  3. mblock
    Click Connect -> Upgrade Firmware
  4. Uploading will take about 17 seconds
    Do not worry if it shows 0% the whole time
    If it is working you will see the RX & TX lights on your BrainBlock flickering
    mblock
  5. Wait until you see the Upload Finished Message
    mblock
  6. Live Mode Example Program


    Live
    You can now control your BrainBlock from your Laptop again

 

 

Scroll to Top