ARDUINO BASIC AND INIT
Sorry for my delay in post i couldn't post" how to make line follower" on the time i promised .Before getting on how we can make a Line follower robot . I would like to share you few basics of the Arduino Board which you are goin to use in order to program your micro-controller .
i would be pinning you a video in next post and it would explain on how you can install your arduino and how to code.
with the use of images Now i would like to explain you the Basic pins included on Arduino.
This is Arduino UNO where it is a small computer which is used to program the micro controller according to your needs . It can be used for your flexibility to design any projects from home automation to a perfect humanoid.
Now i wil explain you the various components of the Arduino board
EXTERNAL POWER SUPPLY
Ofcourse it provides supply to the board it can handle a max of 5V DC and when it is plugged in with the external power supply the board cannot be programmed and the existing program in the micro-controller will be executed.
moreover note that while using USB or EXT power supply the jumper on the board has to be changed accordingly.but now lately equipped board has auto configuration to detect the power.
USB PLUG
It is a serial connection made with your computer from the board with the computer .it is the interface which is used in order for the user to program . The user needs the interface to program namely ARDUINO or VISUAL STUDIO.
during the use of this your digital pin 0 and digital pin 1 will be in use by the USB and the pins cannot be used in the program .
Note:during the use of the serial print in the program the digital pin 0 and digital pin 1 shall be active to communicate with the computer COM port and the pin cannot be used.
DIGITAL PINS(0-13)
These pins are those which are used in programming . we define these pins as input or output .
if we declare these pins as input in the program then the micro controller expects the user to provide some input via these pins .SO the pins which are declared as INPUT must be given to some external sensors and after we receive the input then the input values can be processed using the programs.
PIN 0 AND PIN 1 are used for tx nd rx where they are used to make a serial communication with the external boards or devices like zig-bee etc...
DEFINING DIGITAL PINS IN PROGRAM FOR OUTPUT AND INPUT
Usually the defining of the pins are made in the function called void setup();
Ex:
void setup()
{
pinMode(3,INPUT); //micro-controller expects a input value from pin 3
pinMode(4,OUTPUT);//some output can be made with the pin 4
}
NOTE:
Only digital signals can be sent in digital pins ie 0 volt or 5 volt
Few pins in the board which is marked with symbol '~' is compatible with both digital and analog signals
Analog pins
They are similar to digital pins but they can handle both digital as well as analog signals means we can vary voltage from 0v to 5v as well as use digital signals like 0v(low) or 5v(high).
Reset button
This button is not used to erase the program but however used to repeat the code from the first line of execution.
Reset pin on arudino
This pin is used in order to hardware reset the micro controller.
use of some resistor in between the 5v to reset pin is safe however when 5v is shorted with the reset pin even then the arduino is resetted.
STAY TUNED IN FOR MY NEXT POST ON INITIALISATION OF ARDUINO AND MAKIN A LINE FOLLOWER ROBOT
No comments:
Post a Comment