Ticker

6/recent/ticker-posts

Arduino Basic Project 1

Arduino Basic Project 1 

 Welcome to the Technical Praveen, In this article, we will figure out how to make a few rudiments venture with arduino at home. in the event that you wanna figure out how to make it deliberately read the full article. this is the most fascinating and mainstream venture these days in hardware and designing, a significant number of the understudies from school constantly making this magnificent undertaking. the most effective method to make circuit outline and how to compose the code. 


Beginning 


Before you can begin working with Arduino, you need to ensure you have the IDE programming introduced on your PC. This program permits you to compose, see and transfer the code to your Arduino Uno board. You can download the IDE for nothing through my site. 


When the IDE is introduced, you should associate your Arduino to your PC. To do this, plug one finish of the USB link to the Arduino Uno and afterward the opposite finish of the USB to your PC's USB port. 


Select The Board 


When the board is connected, you should open the IDE and snap on Tools > Board > Arduino Uno to choose the board.



Select Serial Port

Next, you need to tell the Arduino which port you are utilizing on your PC. To choose the port, go to Tools > Port and afterward select the port that says Arduino.


1) Test Arduino

NOW THE FIRST PROJECT BEGINS


The principal venture is one of the most essential and straightforward circuits you can make with Arduino. This venture will test your Arduino by flickering a LED that is associated straightforwardly to the board.

Parts Needed

  • (1) Arduino Uno
  • (1) USB A-to-B Cable
  • (1) LED 5mm
  • (1) 220 Ω Resistor
DIAGRAM


 Project Steps
  1. Twist a 220 Ω resistor to the long leg (+) of the LED.
  2. Push the short leg of the LED into the ground (GND) pin on the board.
  3. Push the resistor leg that’s connected to the LED into the #13 pin.
PROJECT CODE :

void setup()
{
  pinMode(13, OUTPUT);
}

void loop()
{
  digitalWrite(13, HIGH);   // Turn on the LED
  delay(1000);              // Wait for one second
  digitalWrite(13, LOW);    // Turn off the LED  
  delay(1000);              // Wait for one second
}


2) Blink an LED

NOW THE SECOND PROJECT BEGINS

This project is identical to project #1 except that we will be building it on a breadboard.  Once complete, the LED should turn on for a second and then off for a second in a loop.

Parts Needed

  • (1) Arduino Uno
  • (1) USB A-to-B Cable
  • (1) Breadboard – Half Size
  • (1) LED 5mm
  • (1) 220 Ω Resistor
  • (2) Jumper Wires
DIAGRAM


PROJECT CODE :

void setup()
{
  pinMode(13, OUTPUT);
}

void loop()
{
  digitalWrite(13, HIGH);   // Turn on the LED
  delay(1000);              // Wait for one second
  digitalWrite(13, LOW);    // Turn off the LED  
  delay(1000);              // Wait for one second
}



3) Push Button

NOW THE THIRD PROJECT BEGINS

Using a push button switch, you will be able to turn on and off an LED.

Parts Needed

  • (1) Arduino Uno
  • (1) USB A-to-B Cable
  • (1) Breadboard – Half Size
  • (1) LED 5mm
  • (1) 220 Ω Resistor
  • (1) 10K Ω Resistor
  • (1) Push Button Switch
  • (6) Jumper Wires

Project Diagram


Project Code

// constants won't change. They're used here to

// set pin numbers:

const int buttonPin = 2;     // the number of the pushbutton pin

const int ledPin =  13;      // the number of the LED pin


// variables will change:

int buttonState = 0;         // variable for reading the pushbutton status


void setup() {

  // initialize the LED pin as an output:

  pinMode(ledPin, OUTPUT);

  // initialize the pushbutton pin as an input:

  pinMode(buttonPin, INPUT);

}


void loop() {

  // read the state of the pushbutton value:

  buttonState = digitalRead(buttonPin);


  // check if the pushbutton is pressed.

  // if it is, the buttonState is HIGH:

  if (buttonState == HIGH) {

    // turn LED on:

    digitalWrite(ledPin, HIGH);

  } else {

    // turn LED off:

    digitalWrite(ledPin, LOW);

  }

}

Post a Comment

0 Comments