What is Ardublock? How can you use it for your programs?

Introduction

Ardublock is an extension to Arduino ide, enabling you to create a program in Arduino language in block form. You can create a program in two ways: either by writing instructions in Arduino language, as proposed by Arduino ide. Or by placing a succession of instruction blocks.

Ardublock allows you to program an Arduino board without knowing the Arduino language, which simplifies its use. Ardublock is compatible with the Arduino IDE. It can therefore be seen as an enhanced version of the software.

Advantages of Ardublock

  • Easy-to-use block that lets you quickly build your program
  • Free, easy-to-install module
  • Lots of components on the module
  • Continuously updated

Ardublock disadvantages

  • The interface is a bit old
  • Does not work with the version of your Arduino IDE but reinstalls one more.

Install Ardublock

A) Download the module

To install Ardublock, you need to visit the module’s website.

Here’s what you’ll get by clicking on the link:

On the site you have the choice of making a contribution or getting it for free. Once you’ve clicked on one of the choices, you’ll be offered the latest version of Ardublock :

Click on download, and you’ll get a list of the latest versions available. We advise you to click on the latest available version, which is about 837 MB in size:

Once downloaded, you’ll need to return with a .zip file, which we’ll install on Arduino IDE.

B) Installation on Arduino IDE

We’ll now look at how to install the Ardublock module on Arduino IDE. To do this, simply unzip the folder.

Once unzipped, you’ll have a file called arduino.exe :

All that’s left is to launch the program and go to Tools to see Ardublock:

Discover Ardublock

We’ll now look at the different categories of ardublock:

Ardublock Mini: Allows you to create a program in the Arduino language in block form.
Ardublock HMI: Human Machine Interface for direct control of the Arduino board.
Esp Exception Decoder : Module for using the esp8266 wifi module.
Guino : Animator for your LED matrix to address the LEDs you want to control graphically.

A) Ardublock Mini

Ardublock Mini is a module that lets you write your program in block form:

As you can see, there’s a list of components on the left. At the top, you can save your program, upload it to the Arduino board, or open the serial monitor to read the sensor value, for example.

  • Control

As you can see, the control section includes the void loop component, which is the infinite loop containing the center of your program.

Program: contains void setup and void loop

Delay Millis: pauses the program in milliseconds (1000 milliseconds = 1 second).

Repeat indefinitely: allows you to create an infinite loop, for example to make a led blink infinitely.

if: This is a condition that allows you to execute your code if the condition is true.

if/else: allows you to execute instructions if the condition is true, and other instructions in the else if the condition is false.

While: this is a loop that will execute instructions as long as the condition is true.

Pins

Pins allow you to control the analog and digital pins on your Arduino board.

Digital Pin: controls the Arduino board’s digital pins.

Analog Pin: controls the analog pins on the Arduino board.

Set digital/analog pin: declares a pin as input or output.

Tone: allows you to make the buzzer sound.

Test/Operator

The test section contains all the arithmetic operators needed in conditions such as if, for or while. You have greater or equal, a test of equality. You’ll also find Boolean operators such as and, oret not for more complex conditions.

The operator section lets you perform arithmetic operations on numbers, for example. These include addition, subtraction, multiplication and division.

In addition, you have mathematical functions such as map, which transforms a number according to the limits you give it.

Variable conversion functions from float to integer...

Variable/Constante

 

 

In variables, you can store numbers as integers. You must first declare your integer variable with set integer variable. You can then use it with integer.

You can also declare a Boolean, giving it a value of LOW, HIGH, TRUE or FALSE.

Communication

In the communication section, you’ll find all the instructions for using a Bluetooth HC-05 sensor.

There is no wifi module in the communication section.

B) First circuit on Ardublock Mini

Let’s take a look at how to make a first Arduino circuit on Ardublock. We’re going to use an Arduino board to make a LED flash. Here’s the circuit you’ll need to make:

Here is the program associated with the tour:

int led_pin = 11;  // We assign LED to the pins.

void setup() {
    pinMode(led_pin, OUTPUT); // We assign LED as an output
}

void loop() {
digitalWrite(led_pin,HIGH); // We turn on the LED
delay(1000); // Wait 
digitalWrite(led_pin,LOW); // We turn off the LED
delay(1000); 
}

 

C) Ardublock HMI

Ardublock HMI is a man-machine interface that lets you control your Arduino board directly, without programming it. In this tool you can control all the pins on the Arduino board, digitalWrite and measurement tools on analog pins.

  • digitalWrite pins

With the Ardublock HMI module, you can control the digitalWrite pins in high or low state. This can be configured as an output, pwm or servomotor. Once you’ve connected your Arduino board, all you have to do is press on/off to see your component light up.

Analog pins

The Analog section measures your pin voltage from 0 to 5 volts. You have a voltmeter and an oscilloscope to find out what’s happening on your Arduino board.

The voltmeter displays the voltage at each analog pin:

The oscilloscope displays the signals received by the Arduino board:

D) Guino

Guino is an animator for your LED matrix to graphically address the LEDs you want to control.