headerphoto

How to turn on the led of arduino, which is call the led pin?




At the picture above, the led pin is marked as L and to turn it on is very easy, just

upload the sketch

bellow. If you success to upload the code (sketch), the led pin will turn on for 1 second, then turn off for 1 second, and roll it over again and again.


/****************************************/
/* ARDUINO SKETCH (1): BLINK, FLIP-FLOP */
/* TURN ON THE LED AT PIN 13 */
/****************************************/

#define led 13

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

void loop(){
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}


Next→
←Prev

Related Articles

Choose label

Read more

3 comments

  1. A printed circuit board (PCB) is an electronic circuit used in devices to provide mechanical support and a pathway to its electronic components. It is made by combining different sheets of non-conductive material, such as fiberglass or plastic, that easily holds copper circuitry. https://www.pcbonline.com/blog/Flexible_Printed_Circuit_Boards_208.html

    ReplyDelete
  2. I dont leave a lot of comments on a lot of blogs each week but i felt i had to here. Do you need many drafts to make a post? led light module

    ReplyDelete
  3. In addition, white LED innovation, while constantly improving, doesn't yet have the optical shading and brilliance that shoppers have gotten acclimated with glowing lights. LED light box,

    ReplyDelete