Arduino is an open-source platform used for building electronics projects. Arduino consists of both a physical programmable circuit board (micro controller) and a IDE that runs on your computer. IDE used to write and upload computer code to the physical board.
Getting Start
buy an Arduino from e bay or arduino site
or what ever you known place. There is many arduino product had interdused. Hear we are going to talk about uno mega and nano.
install the IDE
windows https://www.arduino.cc/en/Guide/Windows
Linux https://www.arduino.cc/en/Guide/MacOSX
Portable https://www.arduino.cc/en/Guide/PortableIDE
Mac https://www.arduino.cc/en/Guide/MacOSX
Using IDE
Standerd Function
- void setup() { /* run once */ }// The code inside this function is run only once, when new code has been uploaded.
- void loop() { /* run repeatedly */ }// The code inside this runs on a loop. Without any delay function, the default rate of delay is 1ms.
- PinMode(pin_number, INPUT/OUTPUT);// This function declares a given pin to be input or output pin.
- digitalWrite(pin_number,0/1/HIGH/LOW);//This function produces a digital signal of either HIGH(5V) or LOW(0V) on the given pin.
- analogWrite(pin_number, value);//This function produces an analog signal varying between 0 to 5V on the given pin.
- delay(time);// This function provides delay of given time (in milliseconds) during execution of the code.
- digitalRead(pin_number);//This function reads the voltage on the given pin and outputs its value as either 0 or 1.
- analogRead(pin_number);//This function reads the voltage on the given pin and outputs its value as an integer ranging from 0 to 1023.
- Serial.begin(baud_rate);//This function begins serial communication between the microcontroller and the arduino.
- Serial.print();//This function prints the value in its argument on the serial monitor of the arduino IDE.
First Arduino project blinking LED
Circuit Diagram
Code
// the setup function runs once when you press reset or power the board
void setup() {
pinMode(LED_BUILTIN, OUTPUT); // initialize digital pin LED_BUILTIN as an output.
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
How to uplode the code Connect Arduino to your computer and select youer arduino bord from the tool=>bord=> and port from tool=>port=> you can compile and uplode the code using sketch menu
Assemble your circuit and upload the code. Enjoy the arduino experiences.