So guys in this tutorial we will talk about the basic and easiest tutorial of all time in arduino history - THE LED CONTROL BY ARDUINO It is important for all the beginners of robotics. So let’s start
THE PARTS REQUIRED IN THIS PROJECT :-
1.ARDUINO UNO R3 .
2.LED (ANY COLOUR , HERE WHITE)
So, you have to connect the wires . the wiring diagram is given below. Connect short leg (-) to arduino gnd and led long leg (+) to digital 13 of arduino .
So, for code you can go to Files -- Examples -- Basics -- Blink or copy and paste the code below .
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, 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); //
pinMode(LED_BUILTIN, 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); //
Very good information. Best for beginners .
ReplyDeletePlease give tutorials on raspberry pi please.
ReplyDeleteEast or west robomaneet is best
Deletegood bro . loving it
ReplyDelete