Simple LED Blink example

Hello guys, I wrote an article about the simple LED blink example with some more information. If you can check it out for any errors and please suggest anything that I could possible add. Thanks and I hope it helps…

I don't know about "add", but I'd prefer it if you subtracted delay().

AWOL: I don't know about "add", but I'd prefer it if you subtracted delay().

Subtracted to what? :|

Subtracted to not using delay at all

The voltage drop of a Led depends a lot on the colour it emits. Some diodes may have a 0.7 voltage drop, but leds usually have a much higher voltage drop. For infra-red leds it's about 1.8 volts, UV can be close to 4volt.

There's little harm in using a resistor with a higher value as needed, but a red diode (~2v) will shine much brighter as a blue one (~3.2v) when you use the same value resistor.

I don't really mind the delay in your code actually, especially since it is code meant for beginners, and the page looks pretty neat, but if you want to know how to do it without delay for your code, check this Arduino page:

delay(150); // wait for 150 ms

Is not 1 second. :)

I would have to ask what content you’ve provided beyond what is on the Blink page here:

Teaching beginners to use delay() to time tasks is, IMO, like teaching beginning drivers to use the emergency brake to drive your car.

It is not scalable, everything stops during the delay(), and to do anything more complicated than blink an couple of LEDs, they’ll have to relearn and ignore what they just learned.

I really wish they would take that Blink sketch out of the Arduini IDE examples. Almost every book on Arduino programming starts with that, ignores the Blink Without Delay and Debounce examples, and proceeds to use delay() to do the rest of their book.

If I want synchronized LEDs, I can wire up a 555 timer and a 4017. I can even change the timing from LED to LED with the use of some extra parts. But I can’t make them blink out of the previous order. This is why I am learning to program, and using delay() can only blink those LEDs in the same order.

On your next example, you said:

V= applied voltage almost 5V minus 0.7 V (approx voltage drop due to diode)

This is incorrect. 0.7V is the voltage across a standard silicon diode. An LED drops more voltage, dependent on the color and construction. Infrared LEDs drop about 1.5V, red about 2V, yellow and amber a bit more, green more than that, etc.

I also notice you are still using delay() to time things.

My suggestion would be to learn how to use other methods of timing events. Study Blink Without Delay and Debounce. Write articles about using those, and take down the articles about Blink.

Thank you for the feedback. Appreciate that...