Xtreme STEM
DashX

RoboBloX

 

mBlock

Scratch LogomBlock is a visual drag-and-drop programing language based on Scratch by MIT.

 

 

 

Installing mBlock

  1. mBlock
    Download mBlock
  2. InstallInstall
    Install mBlock
  3. Done
  4. Mac users only

    Drivers
    Mac users only:

    You must choose Connect -> Install Arduino Driver
    (requires a reboot after)

     

 

 

Connect BrainBlock to mBlock

  1. Requires a BrainBlock (Arduino)


    BrainBlock
    If you do not have your BrainBlock yet, you can complete these steps later, in class.
  2. Choose the Right Board

    mblock
    Everytime you run mBlock start by checking that you are using the right board:
    Arduino Nano (mega328)

  3. Choosing the WRONG Port

    Wrong
    Click Connect -> Serial Port
    Have a close look at the list of Serial Ports
    This is the list of Ports you WON'T use
    (You might have nothing in the list, that is ok too)

  4. Blank
    Close the list of Ports
    You can simply click anywhere else on the screen
  5. Connect via USB

    USB Cable
    Plug your USB cable into your BrainBlock and your computer

  6. Choosing the Right Port

    mblock
    Click Connect -> Serial Port
    You should now see a new Port in the list
    The new Port in the list is the correct one
    Click on the correct port

    Please note that if you plug your BrainBlock into a different USB Port in the future
    you will get a new Port number

  7. mb

    mb

    You should see the message at the top of the screen change from:
    Disconnected to Serial Port Connected

    If you unplug your USB cable it will change back to Disconnected,
    and you have to reconnect each time.

 

Upgrade Firmware

  1. If you have completed all the steps above you are now ready to Upgrade Firmware

    Firmware is the program that gets loaded into your Brainblock
    and tells it how to communicate with mBlock.

  2. When to upgrade your firmware:


    - If your BrainBlock is new
    -If you uploaded a program in Arduino mode
    -If your BrainBlock is not working
  3. mb

    First you must be connected (see previous instructions)

  4. Firmware is a program that stays on a Microcontroller (microchip)
    We must teach your BrainBlock how to be a robotic brain
    We will download thousands of instructions into your BrainBlock in only 17 seconds
  5. mblock
    Click Connect -> Upgrade Firmware

  6. mblock
    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
  7. clock
    Uploading will take about 17 seconds
  8. mblock
    Wait until you see the Upload Finished Message
  9. You're Done!
    Now you can try hooking-up something simple like
    the BlinkBlock to test your BrainBlock.
  10. If it did not work (or is taking longer than a minute)
    you probably chose the wrong Serial Port.
    -Unplug the USB Cable
    -Close the Upload
    -Close mBlock
    -Start Over

 


 

Advanced: Modes

  • mBlock can run in two different modes:

    • Live (Normal) Mode - This is the normal mode mBlock runs in
    • Arduino Mode - This a special mode that lets your robot run without a laptop

    More Details

 


 

RoboBloX Extension

  1. DashX has created an extension (library) to make using your RoboBloX in mBlock easier:
    mBlock allows developers to create a library (extension) with special blocks.

    Here are a few of the new blocks that you can add into mBlock from FunRobotiX:
    RoboBloX
  2. Download the
    mBlock RoboBloX Library (v2.1
    )
    Download

    You may need to right-click on the link above and choose "Save As", or "Save target as"
    Make sure you save it somewhere you can remember and find it later.
  3. Add Extension
    Open mBlock, click on Extensions from the top menu
    Choose Manage Extensions
  4. ExtensionExtension
    If you are not connected to the internet you will get an empty box (and maybe an "I know" warning box)
    If you are connected to the internet you will see a list of extensions

    Just click on the Add Extension Button
  5. Extension
    Change the file type from .json to .zip
    Then find the library extension file you save earlier:
    RoboBloX_v??.zip
    Click Open
  6. Extension
    Click the Installed Button
    You should now see RoboBloX in the list!
    Click the X to close the window
  7. RoboBloX
    Now if you click on the Robots block
    You should see all the new RoboBloX blocks!

 

 

 

RoboBloX Custom Firmware

  • To use the library in mBlock mode you will need to install the RoboBloX Firmware:

    Download the installer
    or

    Windows Manual Install

    1. Open mBlock and take note of the version at the top of the screen (v3.4.10)
    2. Open the Command Prompt (Click Start and type Command)
    3. Copy and paste this command
      (change the version to match your mBlock version)
      (You need to right click inside the Command Prompt window to be able to paste)
      xcopy "%AppData%\com.makeblock.Scratch3.4.10\Local Store\mBlock\libraries\RoboBloX\src\nano328.hex" "%AppData%\com.makeblock.Scratch3.4.10\Local Store\mBlock\tools\hex" /Y
    4. Go back to mBlock and do a Firmware upgrade
  • Mac

    1. Press Command + Spacebar to launch Spotlight search
    2. Type: Terminal
    3. Copy and paste this command into the terminal
      cp ~/'Library/Application Support/com.makeblock.Scratch*/Local Store/mBlock/libraries/RoboBloX/src/nano328.hex' ~/'Library/Application Support/com.makeblock.Scratch*/Local Store/mBlock/tools/hex' 
    4. Go back to mBlock and do a Firmware upgrade

 

Scroll to Top