In this article I am going to give you a tutorial on “Ardublock ” which is a new graphical programming tool for Arduino. It will help the developers to create complex programming algorithms into simple graphical block diagrams. First you have to install it. Programming with Ardublock provides a graphical interface to developers, in order to reduce their complexities and implement their algorithm in a much efficient manner.
Step by step procedure to do programming with Ardublock
Ardublock is a graphical manifestation of implementing the algorithm on Arduino. First let’s create a simple program which will help us to comprehend the utility of this software. In this simple example we will compare a digital pin number 6 and then will turn the led on and off according to the status of the digital pin number 6.
How to install the Ardublock:
Follow the following steps to install ardublock on your computer
(Install Arduino IDE first if you haven’t done it already)
- Visit http://www.mediafire.com/download/2piif78i552vkn9/Arduino.zipand download Arduino.zip
- Now unzip the downloaded Arduino folder from Arduino.zip anywhere in your PC.
- Now go to “My Documents” folder in your PC.
- You will find a folder called Arduino and it’s the folder created when you installed the Arduino IDE, delete that folder.
- Now copy the unzipped Arduino folder in the “My Documents” folder.
- Now open your Arduino IDE software.
- Go to tools section, you will find ArduBlock there.
Building a project in ArduBlock:
There are several graphical blocks in Ardublock for translating your project in functional blocksOpen Ardublock. A window will open like this one:
First go to the control section and select the program block
Now go to code blocks section and select the setup block and fix it corresponding to the setup slot and write the raw code serial.begin(9600); in the code space.
Now come to the loop part, go to control section and select the if/else block and fix it corresponding to the loop.
Now translate your logic first, go to the logic operators section and select the equivalence operator and fix it in the test section.
Now go to the pins section and select the digital pin and fit your logic by selecting the variables/constants sectionNow select the set digital pin block from the Pins section and fix them accordingly.
So the final shape of the program becomes:
Now press the “Upload to Arduino” button and the block diagram will be translated to the high level language like:
If you have any question, please post it in comments.