An Arduino is a physical hardware which is very useful for electronic projects. The heart of an Arduino is a microcontroller chip which can be programmed by C programing language. It is very cheap and compact in size which can be very useful in robotics projects. There are various type of Arduino boards are available in the market such as Arduino uno, Mega, Nano...etc
Talking about Arduino it consists of several connection pins as shown in the figure. An Arduino can be used to analog to digital conversion and vice versa. As yo can see in the figure the left side pins A0 to A5 are analog pins and the right hand side consist of digital pins. The Arduino can itself provide a constant DC voltage of 3.3V and 5V.
An Arduino can be programed by the Arduino IDE which is a software installed on a desktop or laptop. The Arduino IDE can be downloaded from here.
When you open the IDE it looks like this. When you first connected your Arduino board to your PC with the help of a USB cable you have to select your hardware in the IDE. For this select
Tools > port > Hardware name (Your hardware should appear here).
Now your hardware is ready for programing.
As you can see the program starts with two functions named void setup()and void loop(). In almost all Arduino programs these two functions are essential. The basic template of Arduino IDE is shown below
void setup() {
//set up stuff to only run at the beginning
}
void loop() {
//which consist of the statements about the program
}
We discuss all of these functions later.
No comments:
Post a Comment
keep supporting funwithelectronian.blogspot.com