Arduino tutorial 2- LED Blink program with code explained | How to blink an LED using Arduino |
Вставка
- Опубліковано 16 вер 2024
- Part - 2
* Input /Output Devices
* Analog /Digital Devices
* Explanation of digitalWrite()
* How to blink a LED
Code & Circuit :
drive.google.c...
Learn Arduino programming even without components (Online Arduino Simulator) :
Tutorial video - • How to learn Arduino u...
Part-3 (Push button) : • Push Button and LED wi...
Product Links:
Arduino Uno : www.flyrobo.in...
OR
amzn.to/46vgG9z
LED bulbs : www.flyrobo.in...
OR
amzn.to/3Pz0vOE
-*-*-*-*-*-*-*-*-*-*
Follow us on Instagram :
/ tech_at_home
Like us on Facebook :
/ tech-at-home-220885266...
#ArduinoTutorials#LEDblink#techathome
Thanks for watching!
*Like Share and Subscribe - Наука та технологія
Very good video. I showed this video to my class and instantly they became newton.
Thank you ❤️ 😂
Thanks very much for this. As a complete newcomer to Arduino I have been able to write and edit my first simple sketch and actually understand what all the commands mean. Well done for such a well-planned tutorial.
Welcome!!
My led is blinking ☺️☺️👍
😄😃😃😃😃😃
Pro
How you do it?
thank you for the code explanation! very helpful!
Welcome ❤️
bro i am totally fresher to this concept in my clg they are giving placement training regarding IOT , but i could not understand anything today after seeing ur vd i felt happy thank u so much pls continue do more vds
Thanks for the feedback♥☺
All the best!!!
great video bro I am from software background but i always have a question about these things that how it work now i understood
Thank you!
Very nicely and clearly explained
Thanks
Tysm! this helped me a lot when I was required to do this project
Welcome
sir in my case there is some error in uploding infact I use same code and do all as you done but my port shows two port com1& com3 .I chose both but both led to error
What is the error.
You can check your com port in device manager.
Hello nice video , why you didnt do a resistor for the led so it will not burn with 5v ?
As I have read , pin 13 has inbuilt resistor.
But it is always better to use current limiting resistor.
May be it will burn, if it is ON for long time without resistor.
/* A simple program to sequentially turn on and turn off 5 LEDs */
int LED1 = 13;
int LED2 = 12;
int LED3 = 11;
int LED4 = 10;
int LED5 = 9;
void setup() {
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
pinMode(LED4, OUTPUT);
pinMode(LED5, OUTPUT);
}
void loop() {
digitalWrite(LED1, HIGH); // turn on LED1
delay(200); // wait for 200ms
digitalWrite(LED2, HIGH); // turn on LED2
delay(200); // wait for 200ms
digitalWrite(LED3, HIGH); // turn on LED3
delay(200); // wait for 200ms
digitalWrite(LED4, HIGH); // turn on LED4
delay(200); // wait for 200ms
digitalWrite(LED5, HIGH); // turn on LED5
delay(200); // wait for 200ms
digitalWrite(LED1, LOW); // turn off LED1
delay(300); // wait for 300ms
digitalWrite(LED2, LOW); // turn off LED2
delay(300); // wait for 300ms
digitalWrite(LED3, LOW); // turn off LED3
delay(300); // wait for 300ms
digitalWrite(LED4, LOW); // turn off LED4
delay(300); // wait for 300ms
digitalWrite(LED5, LOW); // turn off LED5
delay(300); // wait for 300ms and start again
}
// This code is just cleaner.
👍
Nice explanation sir😊 awesome 👍
Thank you ❤️
very informative
Hi,
As a newcomer, your video is very useful to me and interesting. I would like to know how to set up 4 LED's
Thank you
Similarly declare leds to different digital pins
Set the pinmode for all pins.
Use digitalwrite for different pins seperately
@@techathome tell the pin number 's which pins are to be use
You can use any digital pins from 0 to 13
thank you
Welcome
Good job 👍👏👌👌
Keep going. 💪🏻💪🏻💪🏻💪🏻
Thank you
im so happy i made my first led lit
i only have 1 question when do i need resistors?
Nice!!
According to what I read, pin 13 has inbuilt resistor.
If using any other pins, It's better to use a resistor always.
@@techathome thank you so much
Nice helpful
THANKS A LOT FOR UR NICE DESCRIBTION
Welcome
Fabulous explanation
Thank you
If I pass in my exams because of this I will give you a chocolate
Soon I will be receiving a chocolate then😶
@@techathome Hopes for the best 😊
Nice one deepak
Thanks
Tnx u so much....I am a beginner...I can comfortably understand everything of aurdino...but it's not clear that can we make connections in every pin or only pin 7??
You can connect to any digital pin
You can use any digital pin as well as analog pins. Analog pins are more powerful pins than digital pins.
Thank you very much💗 this is very important👍
Welcome
Thank you :-)
Thank you for helping.
Welcome
#define LED 13
void setup()
{
pinMode(LED, OUTPUT);
}
void loop()
{
digitalWrite(LED, HIGH);
delay(1000);
digitalWrite (LED, LOW);
delay (1000);
}
not working , my port is not selecting
Which type of Arduino are u using, Ch340 smd chip or the Dip IC one?
how can we change duration of time ?
Change the value inside delay function
Hi mate. thank you for this video and your hard work, it is a very good video adding extra information for us. thank you very much. :¬)
Welcome
Thank u sir
Great video 🔥
Thank you
Sir, would you plz make video on lcd, ph and waterlevel sensor
LCD part 1 : ua-cam.com/video/fyL1h62QHJs/v-deo.html
LCD part 2 : ua-cam.com/video/LyuybcoNEsw/v-deo.html
Other sensor, will make soon
Sir you said : longer leg= anode(+) and positive connected to digital pin and ;shorter leg = cathode (-) which is connected to ground but in this video you connected vice versa
No, I have connected Longer one(+ve) to digital pin only, and shorter one to GND.
Hello sir and thank you
Welcome
(very new to Arduino)Starting from my requirement
I need to turn on a water motor(5v) for about 2 mins after every 12 hours, basically trying to automate water pump for home garden pots when I am travelling.
I feel above code will perfectly work just I need to tweak delay time, is there anything else I should consider ? any other way to do it?
also can I use Arduino Nano instead of UNO? or Uno is better?(as I said new to this)
BTW this doesn't work any more
Product Links:
Arduino Uno : amzn.to/3IGPadf
Thank you dada
Your welcome 🙂
Hello 😊, Please provide All Equipment link for buy it and also Code
Everything is in description
Its working wow
🙂
good video
//UA-cam|Tech at Home
int led1=7;
void setup()
{
//pinMode(pin,mode);
pinMode(7,OUTPUT);
}
void loop()
{
digitalWrite(led1,HIGH);
delay(200);
digitalWrite(led1,LOW);
delay(200);
}
It is showing error
Did you select the port
Yes my led also blinking❤
Sir Arduino code kese banaya ka ak video banaya
I didn't understand your doubt, Code is explained in the same video.
Is there any specific side of jumper wire(positive or negative)?
No
what is the wire name connected from aurdino to the system
Usb A to B cable
can you make complete course on arduino coding and implementation
I already have Arduino tutorials playlist : ua-cam.com/play/PL4B0LEKY-jrT_fjOGkX_NZ52ZHZf8s9S-.html
we need proper definition for setup void,digitalwrite,pinmode
You can also get a detailed explanation on the Arduino official website.
awesome
So good.
Thank you
My led on my arduino uno board is not blinking on pressing the reset button and code is not uploading to it can you please help me 🙏🙏
Any error are you getting??
While uploading
@@techathome yes it is showing that no arduino boards found
@@techathome when I press the reset button the led is not blinking
@@techathome from the same cable I connect another arduino that one is working fine
May be issue with board??
thank you so much it helped ,me a lot 😚😚😚🙄🙄
Welcome
Why have you connected led 1 to 7 can it be connected to any other number in the digital section
Yes you can connect to any of the digital pins,
But declare correctly in the code.
no it is working first not on 7 on 13
It will work on all digital pins, have you configured correctly in code?
What's the use of resistor? I don't know why and where to use them
That is used as current limiting resistor
Usually LED need very less current, if you don't use resistor, LED can burn after using for more time .
But I have heard pin 13 has inbuilt resistor.
U can use with LED, if you are connecting to any other pin except 13.
Which jumper wire is using male to male, male to female , female to female please tell me
Male to male
Bro my transmission light blinking automatically please help me
thanks
Welcome
😊soo cool 🎉
Thank you
Bro, mera blinking program nahi run ho rahahe, mujhe thora help chahiye....
What is the error?
If I want to blink a LED for perticular voltage, so how I can do that?
What are you using to give voltage input?
I have One Uv-LED Want use for different voltages ( say, 6.5V , 7V, 7.5V) here I want to use it for different Power.
Very useful ☺️👍
Thanks
can't set com-state for "\\.\COM24 ??
Check com port in device manager and select the same in Arduino IDE
Sir I have installed arduino in Ubuntu 20.04 my port is like /dev/ttyS4
My output is showing like programmer is not responding.
One more doubt as u said use digital pin for led connection if I connect 7 and running example blink program it's blinking. But when Iam using pin 4 led is not blinking
Regarding 1st question, I have not used Ubuntu OS anytime, so no idea how it shows for Port.
If you are connecting LED to different pin, you also have to edit the pin number in the code.
Tqqq💜💜💜💜
THANKSSS
Welcome
If more LEDs are to be blinked then because I want to make a project which has maths shape like arrow, circle, triangle
Meeru output ni big letters rasaru kada enduku smalls enduku tesukovatledu
Elaaa code Ki related videos Chestara plz its helpful to all why we write the code like this .
How do you change the color?
It is only blue colour led.
Sir mujhe har 30 seconds ke bad blinking led chahiye 5 seconds le liye...
Plzzz help me with the code
Why You didn't used Resistor
For less time it's still ok.
But it is safer to use a resistor.
can i kow the process to blink two LEDS with same code and connections
Just connect one more LED to same digital pin
Sir we know that an LED will fuse if we use 5v dc. Here in the code we are not setting up the voltage to 3.5v approx. which is normal voltage for led. So how the Arduino automatically giving correct voltage for led. Plz tell.
it will always gives 5v dc, so use a current limiting resistor
Prepare diwali light with Arduino
ua-cam.com/video/HCQWPmSDqco/v-deo.htmlsi=GC-dnIPxvUbPzzbG
I want to connect electromagnet,
Turn ON and OFF
Please guide me
You have to use relay module. Refer this tutorial: ua-cam.com/video/iy3nXFh__rg/v-deo.htmlsi=7FvMi5UPKguK-8IV
In this only changes are,
1. Instead of AC bulb, connect your electromagnet wires.
2. Instead of AC power supply, connect DC voltage required for your electromagnet.
@@techathome thank you
Another thing
I want to connect 8 electromagnets
Turn on NC on start
turn off randomly
Once all are turned off wait for RESET button
And do the process again
Please help
In tinkercad, ground pin wire is not there. What to do?
Refer this : ua-cam.com/video/cBmYkaKy0do/v-deo.html
HI SIR I would like to ask can we use this as a indicator .
Yes
And how to make it for slowly turning on and off
Increase the delay
@@techathome thanks for replying
How i connect the Arduino to mobile
There are few apps available on Play Store,
Using that u can write code and upload from your phone using OTG cable.
Can you share the code , the link that you given it is not opening
Can u send request on mail, I will share the file.
How can i give input from pc to Arduino for led on or off by command line?? Or any other method??
Refer this : ua-cam.com/video/uT8-HPMS1cU/v-deo.html
Instead of bluetooth module , you can send value from serial monitor
Hello Sir, could you please provide me with the purchasing link for Arduino Uno from Amazon that you used in the tutorial? The link mentioned in the tutorial description is not opening.
Arduino Uno: amzn.to/40qhiti
How to blink blue led 5 times and stop it then blink red led 5 times
Use For loop with count 5.
Add blink logic inside for loop.
Repeat same for next LED.
My led is not blinking 😢😢😢
Check the connections.
LED hat not resistor ????
Arduino pin 13 already has register inside
no resistor to protect the LED?
That is used as current limiting resistor
Usually LED need very less current, if you don't use resistor, LED can burn after using for more time .
But I have heard pin 13 has inbuilt resistor.
U can use with LED, if you are connecting to any other pin except 13. here you go sir
Yes , even i have come across the same on internet
Pin13 has inbuilt resistor
How can I stop blinking of LED
You can keep the blink logic inside a for loop .
for(int i=0; i
Hello sir, I have facing problem while uploading the code, it shows byte error
Yes me also having that issue
check the port once in tools
Is it possible to make the LED stop blinking after blinking 10 times? And how?
Refer this [I have used built in led- pin 13]
int x=1;
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
if(x==1)
{
for(int i=0;i
Can You provide me Report of this program...🙏
My led is not blinking I also do same but it's not blinking
Can u verify the connections, Anode and cathode
I want Circuit diagram on led blink
It's given in description.
Hy
If i use pin no -6 or -5 that will be run ?
Yes you can use,
But declare the correct pin in the code as well
thanks you so much for your response
@@techathome
Can I call you? I need help!
It says serial port not selected
It says serial port not selected
Have you selected com Port in tools?
Nice one 🔥
my my led is not blinking
What is the error?
if we removed arduino cable , will the led still blink ?
No,
You have to give supply using battery (round pin connector)
Or usb(power bank)
@@techathome ok thanks
How many led can be connected
There are 13 digital pins, you can use them
same way done.but led not blinking ,may i know the reason
Reverse the terminal of LED and check once. Even then if it is not working, connect to any other digital pin.
@@techathome all changes made but no result
@@gayathrinaidumiriyala7262 can you please send me the code.
Mail here : deepakhd20@gmail.com
@@techathome done
@@gayathrinaidumiriyala7262 in the digitalwrite () , instead of led change it to 7 in both lines.
Similar to java ???
It's C
Where is part 1 ?
Complete playlist: ua-cam.com/play/PL4B0LEKY-jrT_fjOGkX_NZ52ZHZf8s9S-.html&si=nfOqvqjlkUnmWSpW