Pattern Codes, ABCDE Code, Arduino Code

Arduino Working Codes

To blink An LED

void setup()
{
         pinMode(13,OUTPUT);
         pinMode(12,OUTPUT);
}
void loop()
{
         digitalWrite(13,HIGH);
         digitalWrite(12,LOW);
         delay(1000);
         
         digitalWrite(13,LOW);
         digitalWrite(12,HIGH);
         delay(1000);
}

Software

Arduino 1.0.5 and above
Arduino software need to be installed before execution


Uploading Code in Arduino Board

1. Open Arduino.exe 
2.Connect your arduino board with your Laptop/PC via USB cable
3.Check 3 things before uploading program in the board 
            - Board -         Tools-->Board-->Arduino Uno(for uno board)
            - Serial Port -   Tools-->Serial Port--->COM5(it varies PC to PC so check in device manager)
            -Programmer-    Tools-->Programmer--->AVRISP mkII
4.Now run the program by clicking ✔ symbol below file menu to validate your code.
5.Now upload the program by clicking ⇾ arrow symbol to upload the code.

Hardware Requirement

1. 2 LED 
2. Arduino Uno, Mega etc board
3. Wires to connect to LED

Connection

1.Connect  1pin of LED to the 13no. pin on Arduino and other on ground pin(Gnd). Same way      
   connect 2LED to the 12no. pin on Arduino and other on ground pin.
2.Connect Arduino board to power it by using USB cable .
3.Wait for 1second and upload the program once again if LED not blnking by following above steps
4.And the LED start blinking

!Hit Like and Comment if you liked My post...

1 comment :

  1. Its good to learn the basic ...
    please give more information

    ReplyDelete

Rolls Royce

Rolls Royce
Amazing Cars

About Me