Sunday, 29 April 2018

Getting Started With Arduino

       

ARDUINO BASICS:-

A tutorial for the beginners

  First thing we need the Arduino IDE software to compile the code which also can upload it to the Arduino.So lets start our first programming that is Blinking an LED.
The LED blinking sketch is the first program that you should run to test whether your arduino board is working and is configured correctly.It is also usually the very first programming exercise someone does when learning to program a microcontroller.An LED has two terminal,longer one is positive and shorter one is negative.Once the LED is connected,you need to tell Arduino what to do.This is done through code,that is a list of instructions that we give the microcontroller to make it do what we want.

On your computer,go open the folder where you copied the Arduino IDE.Double click the Arduino IDE icon to start it.Select File>New and you'll be asked to choose a sketch folder name:this is where your Arduino sketch will be stored.Name it Blinking_LED and click OK.Then type the code(Example 01) into the Arduino sketch editor(the main window of the Arduino IDE).


Now that the code is in your IDE, you need to verify that it is correct.Press the "verify" button.If everything is correct, you'll see the message "Done compiling" appear at the bottom of the Arduino IDE.This message means that the Arduino IDE has translated your sketch into an executable program that can be run by the board.
At this point,you can upload it into the board:press the upload button.This will reset the board,forcing it to stop what it's doing and listen for instruction coming from the USB port.The Arduino IDE sends the current sketch to the board,which will store it in its memory and eventually run it. 


1 comment: