Advanced Arduino Extension v2.5 for mBlock

Author: Aleksandr Grigorev

What is "AdvancedArduino"

"AdvancedArduino" is an extension for the mBlock visual programming environment , which can be used instead of basic "Arduino" extension, and has a lot of extra options when working in Arduino mode.

The description of AdvancedArduino extension v1.0 (old version) see here:

 

(русская ссылка) (English link)

 

 Installing the AdvancedArduino Extension

 

First method

 

     Run mBlock and select Extensions -> Manage Extensions from the menu. The extension list will be downloaded from MakeBlock website.

 

     Type "AdvancedArduino" in the "Search" field. You will see the "AdvancedArduino" element on the list.

 

     Click on the "Download" button of the "AdvancedArduino" element.

 

 

 

Second method

 

     Download or copy "AdvancedArduino.zip" file to your computer.

 

 

Download
Advanced Arduino Extension v2.5
AdvancedArduino.zip
Compressed Archive in ZIP Format 6.7 KB

     Run mBlock and select Extensions -> Manage Extensions from the menu, then click on the "Add Extension" button.

 

     Select the file type "zip-file", scroll to the downloaded archive, then click on the "Open" button.

 

If you have any questions, look at the additional instructions from the Makeblock developers:

 

http://www.mblock.cc/docs/create-extensions-for-mblock/

 

 

 

Examples of using the AdvancedArduino extension

 

Sample 1

 

Blocks with custom code snippets (Arduino IDE code, "Wire" programming language) in a graphical script.

Download
Sample 01 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.3 KB

Attention! When mBlock generates Arduino code sketch, it comments out the code () and def () block values using the /* and */ directives. To make the code fragment visible to the compiler, it is necessary to put the CLOSE "bracket" ( */ ) in the BEGINNING, and the OPEN “bracket”  ( /* ) at the END.

 

 

 

Sample 2

 

Рort number in the function parameter.

Download
Sample 02 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 77.5 KB

Sample 3

 

"Counter" block and "repeat" loop (use Serial monitor).

Download
Sample 03 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.1 KB

Sample 4

 

Рort number in the function parameter and "counter" block.

Download
Sample 04 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.2 KB

Sample 5

 

Transmitting of messages from Serial2 to Serial, an explicit conversion of the value to char type.
Use with ME Auriga or Arduino Mega 2560, use "Auriga Program" header or "Advanced Arduino Program" header.

Download
Sample 05 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 77.4 KB

Sample 6

 

Blocks with library Arduino functions (value conversion functions).

Download
Sample 06 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.1 KB

Sample 7

 

Variables of any digital type (demo of overflow with byte variable).

Download
Sample 07 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.1 KB

Sample 8

 

Variables of any digital type (how to calculate factorial).

Download
Sample 08 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.2 KB

Sample 9

 

Using arrays.

Download
Sample 09 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 75.0 KB

Sample 10

 

Define custom functions that return values.

Download
Sample 10 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 75.1 KB

Sample 11

 

The "line" addition of the custom code snippets.

Download
Sample 11 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.4 KB

Sample 12

 

Using the text file saved on the disk.

Download
Sample 12 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.3 KB

The disk must contain a text file with the appropriate name and content. If it is necessary, change the path to this file in your script.

 

Contents of the text file:

Sample 13

 

2D arrays (multiplication table).

Download
Sample 13 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.5 KB

Sample 14

 

String variables.

Download
Sample 14 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.8 KB

Sample 15

 

"Length" method with String objects. Names matching (visual blocks and text code).

Download
Sample 15 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.5 KB

Sample 16

 

Morse transmitter based on mCore controller.

Download
Sample 16 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.7 KB

"morse-ext-Dat.txt" file

Sample 17

Array of functions

Download
Sample 17 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.5 KB

 

 

Sample 18

Running shadow processes (use the name "myUpdateFunction" for your custom block).

 

Download
Sample 18 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 75.0 KB

 

 

Sample 19

Several shadow processes. Use mBot educational kit with Servo Pack and 3-axis Gyro module

Download
Sample 19 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 78.0 KB

 

 

Sample 20
Shadow processes. "Static" local variables.

Download
Sample 20 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 75.2 KB

 

 

Sample 21

Shadow processes. "Static" local variables with similar names.

Download
Sample 21 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 75.2 KB

 

 

Sample 22

External interrupts. Use names "myHandlerFunction0", "myHandlerFunction1", etc. for your custom blocks. Use "volatile" variables.

Download
Sample 22 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.9 KB

 

 

Sample 23

Compound operators. Increment, decrement, side-effects.

Download
Sample 23 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 74.9 KB

 

 

Sample 24

Scheduled processes. Use names "myScheduledFunction1", "myScheduledFunction2", etc. for your custom blocks.

Download
Sample 24 - Advanced Arduino Program.sb2
Compressed Archive in ZIP Format 75.0 KB