Learning to Crawl: My First Experience With an Arduino

DZone 's Guide to

Learning to Crawl: My First Experience With an Arduino

Suraj Sahoo takes us through his first experience using an Arduino. This article will look at what he has learned so far.

· IoT Zone ·
Free Resource

Being a Web application developer and with the buzz going on around about IoT, I felt left out way behind in the crowd. So, I decided to start my journey to learn IoT. Since I am a baby in this arena, I would like to share my experience learning how to crawl, as I believe there are others in my position.

I have decided to use an Arduino board in order to start my learning experience. Why!? Because it is economical, easy, and has its own IDE to let me write the code and upload to the board. Let's learn some things about Arduino first.


Arduino is a sim1ple micro-controller which is based on an input/output receiving unit. We can have it attached to any sensors, LEDs, switches etc. The best part is it is open source and easy to understand use. You can also contribute to the Arduino community, creating your own prototype programming. For beginners, Arduino is the best option, I would say!

To get started with, you need an Arduino Board. You can get it online at a very minimal price, for around Rs.500 ($7, US). I am using an Arduino UNO board.

The above is the simple Arduino Board which can do amazing things. Let's break down the points mentioned in the diagram and their usage!

USB Jack

Image title

This is the connecting female port, where the cable gets inserted in order to set a connection to the computer to have the IDE accessible and upload the programs. Usually, it is 2.0 USB port. The input and the output passage happens through this, we can consider this to be the starting point of the Board. Usually, the voltage acceptable is:

  • Input Voltage (acceptable)- 7-12V
  • Input Voltage (limit)- 6-20V

Power Jack

As the name suggests, it is the external power supply. But be careful while using this, use a multi-meter to check for the acceptable limit of power to be transferred to the board in order to avoid short circuit.

GND Pins

The grounded pins used to connect the jumper wires to have a grounded circuit. Usually, when we see the connection we will realize that GND pins are considered as the negative supply.

5V Supply

This is the point used to have the breadboard 5V supply in order to power the circuit, which we will check out in a few moments.

3.3 V Supply

This is the point used to have the breadboard 3.3V supply in order to power the circuit. Same as the 5V but based on our circuit requirement. We can also use this in case we are missing resistors.


Though not numbered in the diagram, this is an interesting port on the board, which provides the voltage ref. with which the microcontroller or the Arduino board operates.


The external supply to the board, as discussed above, to pass the voltage to the circuit (external). We can use this port.

Analog Input Pins

These are the analog points on the board which helps convert analog inputs to digital, usually used to read analog signals.

Digital Pins

The digital pins which provide the circuit the uploaded code to connect (layman terms). Used for digital I/O.

Reset Button

This is self-explanatory, used to reset the microcontroller or the board.


When connected to the USB, this green led lids up to let us know the board is powered.

Voltage Regulator

The voltage regulator supplied to the Arduino board.


These are the LEDs that lid up when the code or the program is successfully uploaded to the micro controller. This is one practical implication I have come across so far!

For more info on the pins please refer to Arduino Pins.

For more information about the Arduino itself, please refer here.

Some Pre-Requisites

Here are some pre-requisites required to learn and start working with the Arduino. After you get the Arduino board, next job is to install the Arduino IDE on your system in order to interact with the microcontroller.

To install the IDE visit the link:- Arduino IDE Download. Here, you get a list of operating systems where you can install. This proves it is cross platform. Wow, another great feature!

Note: After the installation, you need to connect the USB jack to the computer via the jack cord and get the Arduino connected.

The IDE somewhat looks like this:Image title

Mark the highlighted portion below, it says Arduino UNO on COM3. COM3 is a serial port id, which suggests we select the Board connection on COM3 port.

For Mac, please follow the link here.

The selection is to be done under: Tools-> Port-> “Select"

Image title

The default code as you see goes like:

Pretty simple to understand. It first does the setup and then the loop code gets executed in order to perform the main task you have configured. There are many sample programs with the code built-in, which we can find under: Files->Examples->Basic->Blink.

Run the Blink program and try to understand what has been done. It is very simple.

Here, the pinMode function activates the pin which you specify as input or output. Here it is Pin 13 and output. Pin 13 is as we all know the default LED. Here it sets the pin and then in loop method, we find the method with the digital-Write prefix, which says that the connection is on the digital pins. The method, which we see has the Pin port number and the other parameter as LOW/HIGH which can be considered as 1/0 in order to light up and light off the LED 13. A delay has been given, to mention the LED light up with the specified delay time.

Before, checking build up which we will be making in the due course, let's have a look at the other components to be used.


The board5 that is familiar to all electrical or engineering students. Still, let's have a brief look at this. As we see in the image, the + symbol, means the voltage connection to be done to this port. The entire line, column-wise is connected. Every whole in the plus column is connected internally. You can use a multimeter to check and verify the breadboard.

The same applies for the symbol column. But, this is usually used for the grounded pins' connection from the Arduino. The a,b,c, and d columns are used to connect the LEDs and the resistors, which we will see shortly. Unlike the +/- these are connected internally, ROW-WISE.

Jumper Wires

Image title

These are the connecting wires to be used in order to connect the Arduino and the breadboard ports. They are cheap and reliable as well.

Note: Also, there are a few LEDs and resistors.

Designing Our Circuit

Below is the basic breadboard connection circuit. I will give a pictorial image of the entire circuit connection. In this article, I will be sharing how to take user inputs through the serial port and use it to Lid on and off the LED.Image title

The circuit connection looks like below:

8                 9

The connection diagram:
Image title

The above diagram is a reference. If you have any doubts, you can add your queries related to the connections.

As you have seen, I have used Pin 13 to connect the Arduino program to the Bread board. The programming uploaded will be used to manipulate the LED on/off via Pin 13.Let's have a look at the code involved:

Thus, the above code is simple to understand. We have used the Serial port to track the user input, which is a part of the Arduino IDE.Image title
Here, the user adds the input and our code checks, if 1 with ASCII code 49, is hit then the LED lids ON and any other key pressed the LED goes OFF.


We have covered a brief introduction about Arduino board and the circuits involved and basic programming uploaded to the Arduino board via Arduino IDE. This same concept can be integrated too.

That's all folks! I really found this interesting and this is surely the future! IoT is the future. I want to have more sensors attached and programming done, so I will do my homework. It would be great if all developers start throwing their hands on this and create awesome stuff! Share your experience and also please let me know if I am wrong because I am still just a baby in the Arduino world.

arduino, arduino ide, board, ide

Published at DZone with permission of Suraj Sahoo , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}