Difference between revisions of "MDesigner: Arduino mode"

From Microduino Wiki
Jump to: navigation, search
Line 1: Line 1:
 +
=Arduino Mode=
 +
'''Arduino''' is a special mode which can be enabled. It acts as a drag and drop editor for programming. The Stage and Actor is disabled and many Block Categories cannot be used. <br>
 +
The main advantage of using Arduino Mode is that code is gennerated, compile, and uploaded. This means that the user can disconnect the project (hardware) from a computer and it can still work.
 +
==Programming Overview==
 +
The programming of a script (program) is outlined below.
 +
{| style="width: 1000px; text-align:left"
 +
|-
 +
| scope="row" colspan="3"| [[File:MDesigner_mBattery_Live_Mode.png|650px]]<hr width="650px">[[File:MDesigner_Live_Mode.png|650px]]
 +
|- style="vertical-align:top;"
 +
| style="width:25%; text-align:left;" | '''Computer:'''<br>Computer running mDesigner (in Arduino mode) compiles the script(program) and sends the compiled code to mBattery/mCenter+.
 +
| style="width:25%; text-align:left;" | '''mBattery/mCenter+:'''<br>mBattery/mCenter+ contains a programmer which programs the Core/Core+ module with the compiled code.
 +
| style="width:50%; text-align:left;" | '''Core/Core+:'''<br>The compiled code is programmed/flashed onto the Core/Core+ module. The compiled code can run independent of mDesigner and can be disconnected from the computer.
 +
|}
  
 +
{| class="wikitable" style="background-color:#FEF9E7;"
 +
|'''Note:''' After uploading the compiled code onto the Core/Core+ the project can be disconnected and can run independent of the computer and mDesigner.
 +
|}
 +
 +
{| style="width: 1000px; text-align:left"
 +
|-
 +
| scope="row" colspan="3"| [[File:MDesigner_mBattery_Live_Mode_Disconnected.png|650px]]<hr width="650px">[[File:MDesigner_Live_Mode_Disconnected.png|650px]]
 +
|- style="vertical-align:top;"
 +
| style="width:25%; text-align:left;" |
 +
| style="width:25%; text-align:left;" |
 +
| style="width:50%; text-align:left;" | '''Core/Core+:'''<br>Compiled script (program) is programmed directly onto the Core/Core+ module and can run independently of a computer and mDesigner.
 +
|}
 +
 +
==Preparation==
 +
===Hardware Preparation===
 +
*Ensure drivers are properly installed by following the '''[[Software_Setup:_mDesigner | mDesigner getting started guides]]'''.
 +
*Connect to the computer with a USB cable with either a:
 +
**'''mBattery''' with a stacked '''Core''' / '''Core+''' module.
 +
**'''mCenter+'''
 +
*Ensure that mBattery / mCenter+ is powered on.
 +
[[File:MDesigner_mBattery_Live_Mode_Hardware_Preparation.png|550px]]<br>
 +
<hr width="550px">
 +
[[File:MDesigner_Live_Mode_Hardware_Preparation.png|550px]]
 +
 +
===Software Preparation===
 +
In order to use Arduino mode it must be switched to in mDesigner.
 +
#With mDesigner open. Click on the '''Arduino''' icon.<br>:[[File:MDesigner_Arduino_Mode_1.png|550px]]<br><br>
 +
#mDesigner will now switch to Arduino mode.<br>:[[File:MDesigner_Arduino_Mode_2.png|550px]]<br><br>
 +
#Select the COM port that mBattery/mCenter+ is connected to.<br>:[[File:MDesigner_Arduino_Mode_3.png|550px]]<br><br>
 +
#'''Ready''' or '''Connected''' should display.<br>:[[File:MDesigner_Arduino_Mode_4.png|550px]]<br>
 +
 +
==Usage==
 +
To compile your script (program) and upload it to your Core/Core+ module. Follow the steps below.
 +
 +
{| class="wikitable" style="background-color:#FEF9E7;"
 +
|'''Note:''' Using '''Arduino''' mode and uploading a program to the Core/Core+ module will overwrite the current firmware. Which includes the special firmware used in '''Live''' mode.<br>Thus, re-programming of the special firmware will be necessary in order to use Live mode again.
 +
|}
 +
#Once your script (code) is assembled and ready. Click on the "Flash firmware" button on the top right of the mDesigner window.<br>:[[File:MDesigner_Arduino_Mode_Upload_1.png|550px]]<br><br>
 +
#mDesigner will compile and start uploading the compiled script.<br>:[[File:MDesigner_Arduino_Mode_Upload_2.png|550px]]<br><br>
 +
#If there is no errors, then the uploading will complete and a "Done" message will appear.<br>:[[File:MDesigner_Arduino_Mode_Upload_3.png|550px]]<br><br>
 +
 +
{| class="wikitable" style="background-color:#FEF9E7;"
 +
|'''Note:''' After uploading the compiled code onto the Core/Core+ the project can be disconnected and can run independent of the computer and mDesigner.
 +
|}

Revision as of 18:50, 24 July 2018

Arduino Mode

Arduino is a special mode which can be enabled. It acts as a drag and drop editor for programming. The Stage and Actor is disabled and many Block Categories cannot be used.
The main advantage of using Arduino Mode is that code is gennerated, compile, and uploaded. This means that the user can disconnect the project (hardware) from a computer and it can still work.

Programming Overview

The programming of a script (program) is outlined below.

MDesigner mBattery Live Mode.png
MDesigner Live Mode.png
Computer:
Computer running mDesigner (in Arduino mode) compiles the script(program) and sends the compiled code to mBattery/mCenter+.
mBattery/mCenter+:
mBattery/mCenter+ contains a programmer which programs the Core/Core+ module with the compiled code.
Core/Core+:
The compiled code is programmed/flashed onto the Core/Core+ module. The compiled code can run independent of mDesigner and can be disconnected from the computer.
Note: After uploading the compiled code onto the Core/Core+ the project can be disconnected and can run independent of the computer and mDesigner.
MDesigner mBattery Live Mode Disconnected.png
MDesigner Live Mode Disconnected.png
Core/Core+:
Compiled script (program) is programmed directly onto the Core/Core+ module and can run independently of a computer and mDesigner.

Preparation

Hardware Preparation

  • Ensure drivers are properly installed by following the mDesigner getting started guides.
  • Connect to the computer with a USB cable with either a:
    • mBattery with a stacked Core / Core+ module.
    • mCenter+
  • Ensure that mBattery / mCenter+ is powered on.

MDesigner mBattery Live Mode Hardware Preparation.png


MDesigner Live Mode Hardware Preparation.png

Software Preparation

In order to use Arduino mode it must be switched to in mDesigner.

  1. With mDesigner open. Click on the Arduino icon.
    :MDesigner Arduino Mode 1.png

  2. mDesigner will now switch to Arduino mode.
    :MDesigner Arduino Mode 2.png

  3. Select the COM port that mBattery/mCenter+ is connected to.
    :MDesigner Arduino Mode 3.png

  4. Ready or Connected should display.
    :MDesigner Arduino Mode 4.png

Usage

To compile your script (program) and upload it to your Core/Core+ module. Follow the steps below.

Note: Using Arduino mode and uploading a program to the Core/Core+ module will overwrite the current firmware. Which includes the special firmware used in Live mode.
Thus, re-programming of the special firmware will be necessary in order to use Live mode again.
  1. Once your script (code) is assembled and ready. Click on the "Flash firmware" button on the top right of the mDesigner window.
    :MDesigner Arduino Mode Upload 1.png

  2. mDesigner will compile and start uploading the compiled script.
    :MDesigner Arduino Mode Upload 2.png

  3. If there is no errors, then the uploading will complete and a "Done" message will appear.
    :MDesigner Arduino Mode Upload 3.png

Note: After uploading the compiled code onto the Core/Core+ the project can be disconnected and can run independent of the computer and mDesigner.