Hello, I'm Manikant Savadatti and today I will introduce you all to Arduino. This post is for absolute beginners. So in this post, you guys will learn the following things and will get answers to the following points.
1)What is Arduino and Arduino Ide?
2)How to use it?
3)Circuit connection?
4)How to blink a led using Arduino?
1:What is Arduino and Arduino Ide
Whenever you ask what is Arduino the first answer what you get is it is a microcontroller.
Now, what is a microcontroller? It is like a mini-brain or a mini-computer. So we can use Arduino to control sensors, led's, motors etcc.. the same way the brain controls our hand's eyes legs etc...
For example: let us compare humans to the Arduino .human brain is like the Arduino, LED sensors motors, etc are like the eyes hands sense organs of a human body. If someone tells you to sit down your brain understands that language and sends a signal to sit down. In the same way, we tell the microcontroller to turn on the led in a particular language (c, c ++, python). Arduino understands this language like c,c++, python etcc.. and makes a led to turn on.
2)How to use it?
You guys can see the pinout diagram of the Arduino .In the above image, you guys can see black holes we use those wholes to connect sensors led's motors etc.All those holes are called as pins and those pins act as switches.All those switches are controllers using the Microcontroller. The black chip which you guys can see is the microcontroller and its name is Atmega328p.This microcontroller is attached to a breakout board which makes easy access of the pins . There are total 13 digital pins ,6 analog pins in Arduino.
3)Circuit Connection:
4)How to write your first program?
This is the Arduino ide.You can download it from this link-Arduino ideCode for led blink
This declares built-in led of Arduino as output
pinMode(LED_BUILTIN, OUTPUT);
In the void loop, you can turn the LED on using this code:
digitalWrite(LED_BUILTIN, HIGH);
This supplies 5 volts to the LED anode.
digitalWrite(LED_BUILTIN, LOW);
This makes the LED_BUILTIN pin back to 0 volts and turns the LED off. We need time delay for a person to see the change in the state of led , so the delay(1000) commands tell the board to wait or do nothing for 1000 milliseconds, or one second.