Blink External LED connected to Arduino

With reference to the Blinking on-board LED program, let us try blinking a LED externally connected to arduino board at pin 12. The program will be very similar to the previous one. Only change will be the pin number which will be 12 as we are now operating on Pin 12 where external LED is attached.

Schematic
Brief Run down of the Program:

  • In the set up portion, we will declare pin 12 as output by using pinMode(12,OUTPUT).  
  • In the loop portion, our algorithm will remain same. However, we will have to use the digitalWrite() function on the pin 12 to specify the output on that pin. For high(LED on), digitalWrite(12,HIGH) and for low(LED off), digitalWrite(12,LOW).
Please try to write the program yourself by using the information above so that you get into the habit of programming.

I have reduced the delay time to mix things a little ;).

Comments

Popular posts from this blog

Microcontroller GPIO

Leap Motion

Uploading your first Dummy Program on Arduino