Print bookPrint book

Robotics-Mobile Robots (eBot, mBot)

Scratch-Arduino Mobile Robots- ScratchyBot, eBOT and mBot 

Site: StemAcademy: Projects & Resources - Maker Space - Coding & Robotics
Course: StemAcademy: Projects & Resources - Maker Space - Coding & Robotics
Book: Robotics-Mobile Robots (eBot, mBot)
Printed by:
Date: Sunday, 17 February 2019, 4:02 PM

How to setup software for either remote controlling or programming eBots and mBots using PC (Windows/Mac) and Smart devices like Ipad and Android.


 









eBot Software Setup


Introduction:

There are two essential and one optional software programs for eBot:

  1. eBot App (essential): our custom program which allows you to upload our custom firmware and test all of eBot's inputs and outputs.
  2. mBlock Scratch(essential): developed by Makeblock and based on Scratch offline 2 and allows Arduino based robots to be programmed in the Scratch environment and robots to interact with Scratch Animations.
  3. Arduino IDE(optional): Allows the programming of Arduino based robots (not required for beginners)

eBot Junior and eBot Pro will accept normal mBlock Scratch and Arduino code, however for our custom eBot Extensions to work in mBlock Scratch you will need to upload our firmware into eBot by using the "Upload Firmware" button in eBot App (see Video Guide below)- additionally- this will need to be done after a compiled Arduino-Scratch program has been put on the robot in order to work in "tethered" mode with the USB cable in mBlock Scratch (Note that if you upload the mBlock Scratch firmware into eBot then our eBot extensions for mBlock will not work, however, you could then program eBot as a standard Arduino UNO using the eBot Pin Configuration.

Note: please use this version of mBlock Scratch (v3.2.2) and DO NOT upgrade as our custom blocks won't work with newer versions just yet.


Files Explained:

 1. eBot App is a program for interfacing with eBot i.e. read all its sensors and control the motors, claws and LEDs etc.  You don't have to use eBot App but it just makes debugging very easy.

 2. eBot Junior mBlock Extensions and  eBot Pro mBlock Extensions are the programming blocks that go into mBlock Scratch so that you have a group of "eBot" programming blocks.

 3.  eBot Makeblock Program Files need to be installed into the Arduino directory of the Makeblock program for eBot program blocks to work and for you to use the simplified eBot script when writing code in Arduino IDE.


Download mBlock Scratch (Windows) unzip and install.

Download eBot File PackageUnzip package which contains all required eBot files separated into folders.


Install eBot Files into mBlock Scratch:

 In the unzipped eBot file package inside the "eBot Makeblock Program Files" folder there are 3 custom eBot files to install: eBotPro.cpp, eBot.h and eBotPro.h

 These must be copied to the source location of the Ardinio IDE inside the Makeblock installation- in a 64 bit system it most likely will be at -

 C:\Program Files (x86)\mBlock\Arduino\libraries\makeblock\src

 Put all three files there - it will be the same directory that has MemCore.h in (so you can always look for it...).


Install Custom eBot Extensions into mBlock Scratch:

In the unzipped eBot file package inside the "eBot Makeblock Extensions" folder there are "zip" files which are the scratch extension blocks.  Install your desired extensions into mBlock Scratch-  open mBlock program and go to "Extensions" then "Manage Extensions" then "Add Extension" ensuring that you select "zip file" not "json" as the file type- navigate to the where you saved the zip file of the eBot Extension Blocks and then "Open" - please ensure that you remove the old version of the extension before adding the newest version.  Close and reopen mBlock- the new custom eBot extensions will be available under the "Robot" tab.


Install eBot App:

In the unzipped eBot file package inside the "eBot App" folder is the latest version of eBot App (executable i.e. *.exe) and beside that is a folder called "firmware" which has our ebot firmware plus the program from the chip manufacturer to program the ebot.  You can move the whole "eBot App" folder to program files on c: drive if you wish but its not necessary as it will run from wherever you put it except a network drive perhaps. You could send a shortcut of eBot App to the desktop or add it to your program menu.

mBot Software Setup

Please dowload the latest version (only our eBot needs V3.2.2) of mBlock and Apps from:

mBot Software Downloads Page



Software Overview: 

mBlock Scratch runs on Mac and PC- based on Scratch offline 2- create Scratch animations and also program mBot for challenges- this program must be used to upload firmware onto mBot even if smart device Apps are being used.  Prepare mBot by uploading "firmware" uisng mBlock Scratch which is a special program that operates on mBot and allows communication with other programs that could be mBlock Scratch or one of the Apps for IOS or Android.  All software for mBot is available from the mBot Software Downloads Page.  

Consider which Apps you need to use:  Smart Device Apps run on Android or IOS:

  • mBot App- remote control of mBots
  • Makeblock HD App-  customised remote control interface and sensor readings of mBot
  • mBlockly App simple programming of mBot
  • Makeblock App- full function programming of mBot and customised remote control interface & sensor readings



Create custom remote control interface with Makeblock APP.

Read mBot sensors with Makeblock APP for Ipad and Android.


Simple Coding with Makeblock App (Blockly)- Obstacle Avoidance Example.

 

Simple Coding with Makeblock App (Blockly)- Stay in the Ring.  


Robot Hardware Setup','

Each robot such as our eBot has various inputs like ultrasonic sensors etc and outputs like motors and servos connected to specific pins on the microcontroller.  How the physical electronic components are connected together is known as the hardware configuration - sometimes called the pin configuration or microcontroller pin/port planner.

If you are using our eBot and our eBot scratch extensions for mBlock Scratch then you don\'t need to know the specifics of the microcontroller pin connections as as everything is preconfigured for you and hence very simple for beginners to start programming.  However when you start using other methods of programming you will need to know which Arduino pin every input/output is connected too.  

In order to program mBot or Lego NXT/EV3 you need to know the hardware configuration when programming.  For our mBot and Lego Teaching robots this configuration is detailed in the next sub-chapter.


Please navigate through this \"ebook\"\r\nusing the chapter hotlinks on the far left hand side of this page OR the small arrows on the far right hand side.




    ',1,0,1464652111,1476595144,''),(25,6,2,1,'eBot Hardware','

    \"\"eBot Hardware\"\"

    eBot is our own tough 3D Printed teaching robot\r\nbased on high quality components and an Arduino UNO Micro-controller. Designed\r\nto focus on robotics programming and problem solving with a capable array of\r\nsensors and hardware features suitable for entry level to advanced robotics\r\nchallenges and supported with excellent learning resources and teacher\r\ntraining.

    \r\n\r\n

    eBot has high capacity 18650 rechargeable\r\nlithium ion batteries and high torque all metal geared servo motors.  It also has an independent 3 Amp voltage\r\nregulator for demanding power drain situations. \r\nCombined with rugged foam filled wide wheels and rear omnidirectional\r\nwheels means eBot has a tough and reliable drive system built for harsh student\r\nencounters all day without recharge.

    \"\"

    \"\"








    eBot Junior Hardware

    eBot Jnr Pin Configuration

    \"\"

    eBot-Junior is our own tough 3D Printed teaching robot using high quality components and Arduino micro-controller. Designed to focus on robotics programming and problem solving with a basic set of sensors and hardware features suitable for entry level and intermediate robotics challenges. eBot-Junior has 1 x Ultrasonic Sensor and 1 x Colour Sensor and no voltmeter/toggle switch. Large LED Matrix Display is included and claws/crane and LED strip are upgrade options.

    Basic Sensor Bumper                         Robust Robot
    1 x Ultrasonic Distance Sensor               1 x Colour Line Follow Sensor
    All Metal Geared Motors                          3D Printed ABS Chassis

    Colour LED Strip                              Matrix Display
    Large Clear Display                                              Onboard Robot Debug
    Individually Addressable                                      Numbers
    Double Colour Illumination                                   Pictures
    Head Lights                                                          Text
    Tail Lights
    Indicators
    \"\"


    eBot Pro Hardware

    eBot Pro Construction Guide 

    eBot-Pro is our own tough 3D Printed teaching robot using high quality components and Arduino micro-controller. Designed to focus on robotics programming and problem solving with a huge array of sensors and hardware features suitable for entry level to advanced robotics challenges and supported with excellent learning resources and teacher training. The eBot-Pro has 2 x Ultrasonic Distance Sensors and 3 x Colour Sensors and a battery voltmeter and on/off switch while the eBot-Junior has 1 x Ultrasonic Sensor and 1 x Colour Sensor and no voltmeter/toggle switch. eBot-Pro allows more advanced robotic challenges and complex programmes due extra colour and ultrasonic sensors.

    Advanced Sensor Bumper
    3 x Colour Sensors
    2 x Ultrasonic Distance Sensors
    Strong Crane/Claw
    All Metal Geared Motors

    Robust Robot
    2 x Line Follow Sensors
    3D Printed ABS Chassis

    \"\"
    Matrix Display
    Onboard Robot Debug
    Numbers
    Text
    Pictures

    Colour LED Strip
    Large Clear Display
    Individually addressable
    Double Colour Illumination
    Head lights
    Tail Lights
    Indicators

    eBot Pro Pin Configuration

    eBot Construction Part 1

    eBot Construction Part 2

    ',1,0,1464652130,1481081678,''),(26,6,3,1,'mBot Hardware','

    \"\"mBot Hardware


    The M-bot base kit from Makeblock has an Aluminium Chassis\r\nand lower power motors and is suited to indoor use. M-bot comes in either\r\nbluetooth or 2.4G wireless options. The M-bot base kit from Makeblock comes\r\nwith an Ultrasonic distance sensor and an Infrared Line Follow sensor, however,\r\nwe strongly recommend that you upgrade to the visible Light Sensor for line\r\nfollowing because it makes coding consistent with other programming platforms\r\nsuch as LEGO and our other Makeblock robots and allows you to utilise our\r\nextensive range of support materials and resources. Furthermore, the light\r\nsensor is educationally preferred because students can debug light values and\r\ngain a more intuitive understanding of the line follow algorithm. M-bot comes\r\nwith a case for your AA batteries, however, we strongly recommend that you\r\nupgrade to our Lithium Ion Rechargeable Battery Pack.

    \r\n\r\n

    M-bot is an autonomous line follower and obstacle avoider\r\nbased on the Makeblock M-Core (not the Orion Makeblock Board as with all\r\nof our other Makeblock robots) plug and play micro-controller and has\r\nsmartphone remote control capacity. The M-Core board has an on-board Lithium\r\nIon Recharger, IR (infrared) Remote Control Transmitter and Receiver, button\r\ninput, buzzer, 2 x RGB LEDs and light sensor. The M-Core board has 4 x RJ12\r\nPlug and Plug input output ports and an on-board port for either the Bluetooth\r\nor 2.4G wireless modules.

    Upgrade Options Include;

    - Lithium Ion Rechargeable Battery Pack
    - 3D Printed Sensor Bumper
    - Bumper Claw Set
    - LED Matrix Display
    - 3D Printed Handle Frame with name plate

    M-bot loves playing Sumo, Line Following and Rescue or anything else you programme him to do. 
    Quality individual components- this is not a toy. Example programming and assembly instructions with classroom resources are provided after purchase. 


    \"\"

    \"\"














    \"\"
















    Steminabox Upgraded mBot Construction Guide

    mbot 3D Printed Upgrades


    \"\"






    Standard mBot Guide from Makeblock

    ',1,0,1464652148,1467679112,''),(27,6,4,1,'Lego-Nigel Hardware','

    Nigel Lego Teaching Robot

    NXT Robot Hardware Configuration

    \r\n\r\n

    \"\"


    Nigel Construction Guide



    ',1,0,1464652172,1465281449,''),(28,6,5,0,'Software Setup','

    How to setup software for either remote controlling or programming eBots and mBots using PC (Windows/Mac) and Smart devices like Ipad and Android.


    \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
    \"\"\"\" \"\"\"\"
    \r\n
    \r\n

    \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
    \"\"\"\"
    \r\n





    ',1,0,1464652209,1475364708,''),(29,6,8,0,'Robot Test and Debug','

    It is advisable to test your robot prior to a programming session.  The robot\'s inputs i.e. sensors like ultrasonics and light/colour sensors should be tested for normal functioning.  Additionally, all the outputs like wheel motors, claws and LEDs should be checked for normal operation.

    For eBot, this can either be done with eBot App or using mBlock Scratch (or Arduino IDE).  

    For mBot, this can only be done in mBlock (or Arduino IDE).

    ',1,0,1464652222,1464768858,''),(30,6,10,1,'mBot Test & Debug','

    Test all the inputs and outputs in mBlock Scratch as per the video guide below:

    Test mBot with mBlock Scratch

    ',1,0,1464652239,1465382487,''),(31,6,9,1,'eBot Test & Debug','

    eBot Test & Debug

    Test with \"Compiled\" Test Programme:

    It is highly advisable to test your robot prior to a programming session.  The robot\'s inputs i.e. sensors like ultrasonics and light/colour sensors should be tested for normal functioning.  Additionally, all the outputs like wheel motors, claws and LEDs should be checked for normal operation.

    For eBot, it is recommended to test your robot with mblock scratch by uploading eBot Input Output Test Program.  Open mBlock program and connect the powered eBot to the computer with the USB cable.  Test all inputs and outputs for proper functioning as per video tutorials.  Download our eBot Junior Test Checklist or the eBot Pro Test Checklist.  Watch ebot and determine sensor readings and output functioning- record results in the checklist.  Additionally, the \"offset\" for servo motors can be determined with eBot Test STOP Code.

    Test with \"Tethered\" Test Programme:

    eBot can also be tested in \"Tethered Mode\" but must have our firmware installed in order for our custom eBot Scratch blocks to work in mBlock- Open the eBot App and connect a powered eBot with USB cable to the computer and click on the \"Upload Firmware\" button at the top left of eBot App.  After you have loaded ebot\'s firmware with ebot app.  You can test ebot with eBot App and the settings are stored in eeprom memory, however these settings are not accessible with compiled code, so its best to have the blocks setup in mblock so they can carry over into compiled code.  

     Upload eBot Firmware using eBot App


    Test and Debug eBot with eBot App:

    Open the eBot App program and connect the powered eBot to the computer with the USB cable.  Test all inputs and outputs for proper functioning using the eBot App tabs and functions as per video tutorial. Test eBot Inputs with eBot AppTest and Setup eBot with eBot App

    ',1,0,1464652257,1479766868,''),(32,6,11,0,'Robotics Activities & Challenges','

    Content

    ',1,0,1464652286,1464663776,''),(36,6,16,1,'Line Follow','

    Line Follow - Single Sensor Bang Bang Task:  Study the algorithm as a powerpoint presentation or video. View detailed NXT (NXT colour sensor) (NXT light sensor) or EV3 (EV3 colour sensor) (EV3 light sensor) coding instructions.  If needed, download the NXT code (NXT colour sensor) (NXT light sensor) or EV3 code (EV3 colour sensor) (EV3 light sensor- eBot Line Follow Scratch Code (mblock).  Your robot should behave something like this video.

    Line Follow - Single Sensor Bang Bang Algorithm Video

    Line Follow - Single Sensor Finish the Turns Task:  Study the algorithm as a powerpoint presentation or video. eBot Line Follow with finish the turns Scratch Code (mBlock)

    Line Follow - Single Sensor Finish the Turns Algorithm Video

    Line Follow - Two Sensor Bang Bang Task:  Study the algorithm as a powerpoint presentation or video

    Line Follow - Two Sensor Bang Bang Algorithm Video

    Line Follow - Two Sensor Finish the Turns Task:  Study the algorithm as a powerpoint presentation or video.

    Line Follow - Two Sensor Finish the Turns Algorithm Video

    ',1,0,1464652375,1473219532,'');

    It is advisable to test your robot prior to a programming session.  The robot's inputs i.e. sensors like ultrasonics and light/colour sensors should be tested for normal functioning.  Additionally, all the outputs like wheel motors, claws and LEDs should be checked for normal operation.

    For eBot, this can either be done with eBot App or using mBlock Scratch (or Arduino IDE).  

    For mBot, this can only be done in mBlock (or Arduino IDE).

    eBot Test & Debug

    Test with "Compiled" Test Programme:

    It is highly advisable to test your robot prior to a programming session.  The robot's inputs i.e. sensors like ultrasonics and light/colour sensors should be tested for normal functioning.  Additionally, all the outputs like wheel motors, claws and LEDs should be checked for normal operation.

    For eBot, it is recommended to test your robot with mblock scratch by uploading eBot Input Output Test Program.  Open mBlock program and connect the powered eBot to the computer with the USB cable.  Test all inputs and outputs for proper functioning as per video tutorials.  Download our eBot Junior Test Checklist or the eBot Pro Test Checklist.  Watch ebot and determine sensor readings and output functioning- record results in the checklist.  Additionally, the "offset" for servo motors can be determined with eBot Test STOP Code.

    Test with "Tethered" Test Programme:

    eBot can also be tested in "Tethered Mode" but must have our firmware installed in order for our custom eBot Scratch blocks to work in mBlock- Open the eBot App and connect a powered eBot with USB cable to the computer and click on the "Upload Firmware" button at the top left of eBot App.  After you have loaded ebot's firmware with ebot app.  You can test ebot with eBot App and the settings are stored in eeprom memory, however these settings are not accessible with compiled code, so its best to have the blocks setup in mblock so they can carry over into compiled code.  

     


    Test and Debug eBot with eBot App:

    Open the eBot App program and connect the powered eBot to the computer with the USB cable.  Test all inputs and outputs for proper functioning using the eBot App tabs and functions as per video tutorial. 

    Test all the inputs and outputs in mBlock Scratch as per the video guide below:


    Content

    Obstacle Avoidance and Tunnel Run Task: Study the algorithm as a powerpoint presentation or video. If needed, download the mblock Code -  your robot should behave something like this video.


    Content

    SUMO (SUMO PLUS)


    Stay in Ring Task:  Study the algorithm as a powerpoint presentation or video (colour-sensor) and video (light-sensor). 

    Stay in the Ring Algorithm  

    View detailed NXT (NXT colour sensor) (NXT light sensor), EV3 (EV3 colour sensor) (EV3 light sensor) or mBlock Scratch light sensor coding instructions. 
    If needed, download the NXT code (NXT colour-sensor(NXT light-sensor), EV3 code (EV3 colour sensor) (EV3 light sensor) or mBot Scratch Code-  or eBot Scratch Code (mblock).  Your robot should behave something like this video.


    Scan and Charge Task:  Study the algorithm as a powerpoint presentation or video.  

    View detailed NXTEV3 or mBlock Scratch light sensor coding instructions.  If needed, download the NXT codeEV3 code, mBot Scratch Code or eBot Scratch Code (mblock).  Your robot should behave something like this video.

    Scan and Charge + Claws Task:  Study the algorithm as a powerpoint presentation

    View detailed NXT or EV3 coding instructions.  If needed, download the NXT code or EV3 code - eBot Scratch Code (mBlock) your robot should behave something like this video.

    Claws Task:  Study the algorithm as a powerpoint presentation. View detailed NXT or EV3 coding instructions. If needed, download the NXT code or EV3 code - your robot should behave something like this video.


    SUMO: Stay in Ring + Scan and Charge Task:  Study the algorithm as a powerpoint presentation. View detailed NXT (NXT colour sensor) (NXT light sensor), EV3 (EV3 colour sensor) (EV3 light sensor) or mBlock Scratch (EV3 light sensor) coding instructions.  If needed, download the NXT code (NXT colour sensor) (NXT light sensor), EV3 Code (EV3 colour sensor) (EV3 light sensor) or mBot Scratch Code - eBot Scratch Code.

    Your robot should behave something like this video.

    Stay in Ring + Scan and Charge + Claws Task:  Study the algorithm as a powerpoint presentation. View detailed NXT (NXT colour sensor) (NXT light sensor) or EV3 (EV3 colour sensor) (EV3 light sensor) coding instructions. If needed, download the NXT code (NXT colour sensor) (NXT light sensor) or EV3 code (EV3 colour sensor) (EV3 light sensor) - your robot should behave something like this video.

    Line Follow - Single Sensor Bang Bang Task:  Study the algorithm as a powerpoint presentation or video. View detailed NXT (NXT colour sensor) (NXT light sensor) or EV3 (EV3 colour sensor) (EV3 light sensor) coding instructions.  If needed, download the NXT code (NXT colour sensor) (NXT light sensor) or EV3 code (EV3 colour sensor) (EV3 light sensor- eBot Line Follow Scratch Code (mblock).  Your robot should behave something like this video.


    Line Follow - Single Sensor Finish the Turns Task:  Study the algorithm as a powerpoint presentation or video. eBot Line Follow with finish the turns Scratch Code (mBlock)


    Line Follow - Two Sensor Bang Bang Task:  Study the algorithm as a powerpoint presentation or video


    Line Follow - Two Sensor Finish the Turns Task:  Study the algorithm as a powerpoint presentation or video.


    Get the Can Task (Scan & Charge): Study the algorithm as a powerpoint presentation.  View detailed NXT or EV3 coding instructions.  If needed, download the NXT code or EV3 code - eBot Scratch (mblock) Code -your robot should behave something like this video.



    Line Follow + Get the Can Task:  Study the algorithm as a powerpoint presentation.  View detailed NXT orEV3 coding instructions.  If needed, download the NXT code or EV3 code - your robot should behave something like this 



    SUMO Rescue:  eBot Sumo Rescue Scratch Code (mBlock)

    Content