Skip to main content

Program Arduino With Fun

 Programming Arduino With Fun

ArduBlock


Visual Programming Languages and Ardublock

From Physical computing to visual programming
Computer Science is a dynamic field of study. To cope with its evolution, everyone can participate. Thus Physical Computing will teach us how to design, build and understand complex systems. In fact, physical Computing is an approach to learn how we communicate through computers that starts by considering how humans express themselves physically. For example, we spend a lot of time building circuits, soldering, writing programs, building structures to hold sensors and controls, and figuring out how best to make all of these things related to a person’s demand. Using prototyping may make our work easier. Thus, prototyping plays an important role in Physical Computing. Tools like the WiringArduino and Fritzing as well as I-CubeX help designers and artists to quickly prototype their interactive concepts. Through that the visual programming (or graphical programming) can make programming physical computing with Arduino as easy as drag and drop.
Visual programming languages for their ability to introduce variety of people including non-specialists and students, to programming. With color coded operators, geometrically shaped data types, and no semicolons (!), visual languages have a unique ability to make programming a more intuitive experience. And with the (admittedly necessary) annoyances of syntax removed, more of your programming focus can be directed towards solving the actual problem.
Physical Computing can be an introduction to programming, integrating the arts, engineering and computing. It is also open to students who want to learn about microcontrollers and explore more advanced work in computing. In this article, we will study AVR microcontrollers under the Arduino physical computing environment, which is an ideal platform for prototyping high-level microcontroller applications capable of communicating with a PC and displaying interactive graphics. Particularly, we will speak about Ardublock which gives an opportunity to program Arduino board. Ardublock is a graphical programming environment that is both easy to use and introduces computational thinking.
Why Visual Programming Language?
By Physical Computing we mean the building of little systems, usually interactive, composed of sensors (like button), actuator (like led and motors) which are linked by microcontroller. Arduino respond to that criteria, it is turning 12 years old to accomplish this need. Nowadays there are more than 100,000+ Arduinos on the market, and within the next 5 to 10 years, the Arduino will be used in every school to teach electronics and physical computing. That’s a big deal because engineers tend to design platforms for other engineers, not for artists, or kids who want to connect stuff up in a simple way to share an idea. The Arduino is simple, but not too simple. There are plenty of other microcontroller boards, but Arduino is probably the best known today and has turned into a global phenomenal. The questions here are:
How to make it possible for non-programmer to create electronics, fast. How to make Arduino used by everyone?
Some studied visual Programing languages Visual Programming language is the answer for these questions. There are a variety of visual languages out there, in the following we will list the most known ones and those that we investigated them. To make our exploration more significant we will execute a basic example of Arduino which is blinking led with every VPL tool.
  • Scratch For Arduino
Scratch for Arduino (S4A) is a modified version of Scratch ready for communication with Arduino boards. So what is scratch? Scratch is an open source and educational software focused mainly for children, designed by the Lifelong Kindergarten group at MIT Media Lab in 2006, and implemented in Smalltalk (Squeak). It is a graphical programming language that aims to teach children the principles programming through the creation of simple games and interactive movies. The programming instructions are pieces that have to be stick each other in an order to form blocks and make a coherent program, just like a puzzle. The figure 1 presents the basic example of Arduino, which is the blinking led. After choosing the board which is Arduino Uno and make the pieces of puzzle together we can upload the visual program. As we can remark that there is no code generated.
Figure 1: Blinking led using S4A
Figure 1: Blinking led example using S4A
  • Mindplus
The official site web of Mindplus mentioned the definition of Mind+ as follows: “Mind+ is a flow-based visual programming software for Arduino that enables anyone to make fast prototypes intuitively and enjoy hacking even without programming background” Mind+ is a free graphical programming software for Arduino, especially for artists and DIY enthusiasts without programming background. It is composed of several modules that we can use without generating or even seeing the source code of the module. So instead of writing codes on Arduino IDE, we can easily make a program with only 3 software modules for one’s project. The figure 2 presents the blink example for Arduino. After connecting the module as follows , we choose the type of the Arduino board and the com then we upload.
Figure 2: Blinking led example using Mind+
Figure 2: Blinking led example using Mind+
  • Minibloq
Minibloq is a graphic programming environment which facilitates the introduction of students into the world of programming. The students use colorful blocks to program physical computing devices very easily. The figure 3 presents the blink led example of Arduino .On the left, while connecting blocks the code is generated.
Figure 3: Blinking led example using Minibloq
Figure 3: Blinking led example using Minibloq
  • Blockly
Google Blockly, a programming language influenced by the aforementioned Scratch, is different from other graphical programming languages in that it is not intended for direct use. Instead, Blockly can be seen as a set of libraries that greatly facilitates the development of a Scratch-like programming language. The blink led with Blockly includes three steps : First we make the blocks together  . Then we press the ‘arduino’ Tab to generate the source code .It is the real Arduino code.   Finally we copy the source code and paste it on the Arduino IDE and we upload the code on the board.
  • Modkit
Modkit is an in-browser graphical programming environment for little devices called embedded systems. Modkit can currently program Arduino and Arduino compatible hardware using simple graphical blocks similar to and heavily inspired by the Scratch programming environment developed by the Lifelong Kindergarten Group at the MIT Media Lab.”The blinking led example with Modkit generates the source code after making the blocks together we have our Arduino working.But the code isn’t the same as the source code used by the arduino IDE .
  • Ardublock
The Ardublock software is a plugin which is added to the IDE of arduino and which allows the user to program in blocks of functions, a little as scracth4arduino, or to appinventor for android. The good point of ardublock is that it generates the lines of codes. In addition to blocks that are literal translations of the functions in the Arduino library, it also provides some predefined blocks for working with a variety of electronic components supported by Scoop ,Adafruit, DFrobot. ,TinkerKit from Arduino and partial support for Grove from SeeedStudio. Example of Blink led using Ardublock : After adding the ardublock plugin to the Arduino IDE we can start with our first code the blink led. So we connect the blocks then we tape upload automatically the Arduino code is generated and uploaded to the board. The figure 4 illustrates the example of blink led .  The ardublock generates the same source code as Arduino IDE.
8
Figure 4: Blinking led example using Ardublock
Ardublock is a very convenient way to get people to start to learn Arduino.Why?
We have started to identify the main use of visual programming language, which is let end users program an electronics platform. This work could benefit from comparative studied visual programming environments for Arduino, such as S4A (Scratch forArduino) Minibloq, Mindplus, Blockly, Modkit and Ardublock. The Blocks view in Modkit and Ardublock, while graphical, uses similar terminology to the default Arduino IDE. Other visual environments, such as Minibloq and Mindplus, differ more radically in their presentation of programming constructs and their approaches to program construction. Ardublock provides an integrated tool that makes it possible to write Arduino programs using the same style of graphical blocks as Scratch and Blockly. In addition to blocks that are literal translations of the functions in the Arduino library, it also provides some predefined blocks for working with third party Arduino components. When programming an Arduino board using ArduBlock, the graphical program is translated to regular Arduino code, not unlike Blockly’s language generators. This facilitates the transition between using graphical blocks for programming and using written C++ code, which is very helpful for novice programmers. Ardublock is a new way of programming physical controllers (Arduino) using drag and drop through graphical methods. It’s built around the idea that users will be able to make their system works without even write the code. The Ardublock team members are making it built and improved for step-by-learning. The ardublock philosophy is as a gateway environment to eventually lead non-programmer to a really interested into “text” based programming.

Comments

Popular posts from this blog

Lie Detector

Lie Detector How can an Evil Genius be sure that their prisoners are telling the truth? By using a lie detector, of course. This lie detector (see Figure) uses an effect known as galvanic skin response. As a person becomes nervous—for example, when telling a lie—their skin resistance decreases. We can measure this resistance using an analog input and use an LED and buzzer to indicate an untruth. We use a multicolor LED that will display red to indicate a lie, green to indicate a truth, and blue to show that the lie detector should be adjusted by twiddling the variable resistor. There are two types of piezo buzzers. Some are just a piezoelectric transducer, while some also include the electronic oscillator to drive them. In this project we want the former type without the electronics, as we are going to generate the necessary frequency from the Arduino board itself. Hardware The subject’s skin resistance is measured by using the subject as one resistor in a potential d

Arduino Based Digital IC Tester Using MATLAB

Arduino Based Digital IC Tester Using MATLAB                             Testing of digital electronic systems generally involves applying a set of test stimuli to inputs of the device-under-test (DUT) and analysing responses of the system using a response analyser. If the DUT generates correct output responses (also called the golden response) for all the input stimuli, the DUT is regarded as fault-free. Those DUTs that fail to meet the golden response are regarded as faulty or defective. Block diagram for testing a device is shown in Fig. 1. Fig. 1: Block diagram for testing a device This project describes testing of 74xx series digital ICs using a MATLAB graphical user interface (GUI) drop-down menu based approach. MATLAB acts as the test stimuli generator to the IC, which is the DUT. The GUI initiates communication with the Arduino and provides a user-friendly and interactive approach to conduct the test. The MATLAB source program (ic_tester.m) acts as the respo