Sunday, 19 July 2015

Try first program on arduino

Hello, this is the second part of arduino tutorial series.
Hope you have successfully installed arduino integrated development environment and the required driver.
Now we will try to do something useful using it.
In AVR studio there are some critical steps like making .hex file then burning it to microcontroller using burner. In case of arduino these middle steps are automatically done by arduino IDE itself.  In arduino there remains a boot loader in the microcontroller chip. This makes burning  the program so easy. You can program it so many time. This is why it is very good for beginner.
The program written for arduino is called sketch.
First we will try to blink a LED that is connected with arduino boared itself.
Let’s write the program
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
  Most Arduinos have an on-board LED you can control. On the Uno and
  Leonardo, it is attached to digital pin 13. If you're unsure what
  pin the on-board LED is connected to on your Arduino model, check
  the documentation at http://arduino.cc
  This example code is in the public domain.
  modified 8 May 2014
  by Scott Fitzgerald
*/
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}
Upload the sketch . then see what happens!

Wednesday, 15 July 2015

Lets start arduino

How  you all?
After a long interval I am writing this post. Actually I was busy .
In previous projects we need to make different circuits for different projects , soldering was a tough part.
Today, we will start a new topic that is more advanced than simple analog or digital electronics. It is about microcontrollers. Here one main control circuit can do million of jobs by just changing their program.
Basically microcontroller is a single chip computer, having CPU and Memory space, input and output ports. Advanced microcontrollers includes timer, ADC,DAC, serial i/o and many other additional features.
Actually there are so many microcontroller and their programming environment(Atmel AVR, PIC, INTEL 8051, ARM).  So it is not easy to choose one of them for a beginner. This tutorial is not for an expert, it is for them who wants to start working with microcontrollers
Microcontrollers comes in market in several packages . here we will discuss the DIP package of Atmega328.
Commonly we use AVR STUDIO  for writing program for the microcontroller made by Atmel. It is very good.
But I think for a beginner it is quit hard.
There is a easy way to start with microcontrollers. It is open source hardware platform called arduino.
   Here code is very easy , and many library functions has made it too simple to use. You just need a knowledge on basic C programming structure . the program almost looks like a C program but it is not actually C.
Some people says that arduino is not a good way to start learning. They are quite right. But I think you don’t need to know at the beginning whether 5 or 7 is integer , float ,odd or even. You just have learn how to add them. Details you will understand of your own if you have interest.
So, lets start
I said that arduino is an open source hardware platform that is designed to work with some specified AVR microcontrollers. You can clone the arduino hardware . But you can steel use the same programming environment. Some companies are cloning arduino board and named the new board as ‘ROBODUINO’, ‘T-DUINO’, etc. the organization named skubotics is making T-duino . Original arduino boards are very sophisticated , they can handle the current up to 800 to 850 mill amps. A little increase in current may damage the board. The T-duino board is designed such a way that it can handle 1amp current easily.
Now come to the main practical point.
What you need-
1. One arduino board(for a beginner arduino uno with atmega 328 is better ), of a clone one.
2. A desktop or a laptop( I will show in windows 8.1 operating system in my blog)
3. one USB connector (Female B), like the cable of old printers.
4. common electronic components (I think you already have them)
The first thing you have to do that is download the arduino IDE for windows( Integrated Development Environment)
From the arduino’s official website www.arduino.cc
http://arduino.cc/en/Main/Software
(in this post I will discuss on the version 1.5.8, all versions are almost same)
Install the IDE on your computer after downloading.
Then connect the arduino board with your computer using the USB cable. Your board is a new hardware to your computer. You need to install the driver so that your computer can identify and recognize your arduino board.
Here I discuss the driver installation process in windows 8.1
Go to device manager
Look there is a option UART BRIDGE CONTROLLER
Remove and re connect  USB and see which new device name is coming , make a right click on the device and update the driver from the installed program files of arduino of C drive of your computer.

Now sometime a problem occurs , that was also happened with me. The official driver don’t always support . There is an another FTDI driver.
First try with the official driver . If you face any problem free to contact with us we will provide you the drivers.