Holidays are
the perfect time to explore,learn and build things. It’s holiday time for me
and I thought why not build something using Arduino. Arduino is a tiny microcontroller development board using which one can build cool projects. Actually am regretting now that why didn’t I took it early
like in my first year of engineering I could have learnt lot many
things, But it's never too late to learn something, So here I have compiled some points about Arduino
which might help a beginner.
which might help a beginner.
What is Arduino?
Before
beginning to use it lets know a little bit about Arduino.
Arduino is
an open source microcontroller development board. Designed and manufactured in
Italy. This project was started with a purpose of providing students
and enthusiasts a cheap but powerful development board in order to learn, experiment and build. The available development boards at that time were costing nearly 100$ and Arduino costs one fourth of it. All the resources and designs of Arduino are licensed under Creative Commons and are free to use and modify.
and enthusiasts a cheap but powerful development board in order to learn, experiment and build. The available development boards at that time were costing nearly 100$ and Arduino costs one fourth of it. All the resources and designs of Arduino are licensed under Creative Commons and are free to use and modify.
There are
different models of Arduino boards like Arduino Uno, Arduino Leonardo, Arduino
Mega, Arduino lily pad etc.,
Which board to choose?
It depends on developer on selecting the board depending upon the requirements of
project he/she is building. If one is planning to use it initially to learn and
experiment then it’s better to select Arduino Uno.
As I
mentioned earlier Arduino is an open source project, its schematics are
available in their website. So the boards can be bought online or can even be realized on a breadboard using the schematics. Interested can even manufacture
it themselves.
I bought an
Arduino Uno R3 from Snapdeal for Rs 560. The board actually cost around 1600 but one
can get a best deal in amazon, snapdeal or flipkart.
Components Required for Initial
setup:
- An Arduino board ( Arduino Uno R3)
- USB A to B cable
- Bread Board
- LEDs and Resistors.
USB cable
will be available in any computer store. The cable will power the Arduino board
when it’s connected to the computer and it is also used to load the program
into it. Even power supply can be given externally when it isn’t connected to
the computer.
Initial Setup:
Arduino is
provided with its own IDE to program it. Download the IDE from www.arduiono.cc . Install it
and reboot the system.
Connect the
Board to computer using USB A to B cable.
Then go to
Control Panel > System and Security > System > Device Manager
There select
Ports (COM & LPT)
If a yellow
caution mark appears on the name which mean that device diver isn’t recognized
by the computer then
> Right click
on the device name > Update device Software > Browse my computer driver
for software
> Then go to
the folder of Arduino IDE which by default will be stored in program files in
local disk C and point it to the folder drivers.
> Run the
Arduino IDE.
> Go to Tools
> Serial Monitor.
A pop up box
should appear as shown in the below picture.
If an error occurs which again mean the absence of device driver try the above mentioned method again or try reinstalling the IDE and reboot the system. While reinstalling change the destination folder (This actually for me :-D ).
If an error occurs which again mean the absence of device driver try the above mentioned method again or try reinstalling the IDE and reboot the system. While reinstalling change the destination folder (This actually for me :-D ).
Hello World:
Let’s write
the first program. This program blinks a LED. Blinking LED is like Hello world
programs in software programming for physical computing ;-).
As you
launch the IDE initially there will be two functions displayed into by default.
Void setup()
is used for initial setups in the program.
Void loop()
is used for repeating certain segments in the program again and again.
The program
is written in C. All the details about programming language is available in their website.
Type the
following program in the IDE.
int pin=13;
void setup()
{
pinMode(13,OUTPUT);
}
void loop()
{
digitalWrite(pin,HIGH);
delay(500);
digitalWrite(pin,LOW);
delay(500);
}
'pin' is a
variable which holds the pin number which is used in the program. Even pin
number can be used directly instead of variable, delay() function generates a
delay in terms of milliseconds.
> Go to sketch
Compile it.
> If no error occurs, Upload
it.
A led near
the pin 13 which is marked by L should blink with 0.5 second delay.
For clarity
a LED can be connected externally between pin 13 and Ground to see it blinking.
Many more
example programs are available in their website. The only way to learn
something is continuously experimenting with what we have learnt. Limitless Creative and
awesome things can be built using Arduino. Only imagination is the limit to what we build other
than its processing speed :-P. Even Arduino can be used along with the Raspberry
Pi to build things. It’s design can be changed and many more chip sets like
DAC, Wi-Fi and also Ethernet ports can be included.
Hope this
post was useful will be back with many more.
Have a good
day.
No comments:
Post a Comment