New Adafruit Arduino Lessons

Hi Simon,

You're quite busy promoting Arduino (and Android and Raspberry and ...), I like that. However ....there always is a however :wink:

Think you should have learned people using Serial prints first,
then millis() to simulate a "clock"
and then you can learn them blink without delay ...

Still, a good initiative!
Rob

Think you should have learned people using Serial prints first,
then millis() to simulate a "clock"
and then you can learn them blink without delay ...

Thanks Rob.

The eternal debate - teach good habits from the outset vs. get started with the 'simplest' way and learn the 'best' way later.

Very true :wink:

The eternal debate - teach good habits from the outset vs. get started with the 'simplest' way and learn the 'best' way later.

I think that delay() is a lazy crutch. Learning to do some things simply/quickly and some things right is possible.

If you are going to discuss delay() in lesson n, then millis() and the right way need to be lesson n+1.

PaulS:

The eternal debate - teach good habits from the outset vs. get started with the 'simplest' way and learn the 'best' way later.

I think that delay() is a lazy crutch. Learning to do some things simply/quickly and some things right is possible.

If you are going to discuss delay() in lesson n, then millis() and the right way need to be lesson n+1.

Well actually that is just one example of a 'blocking' function and a more detailed lesson should explain the differences and reasons for why any specific function may or may not be 'blocking' and what impact that can have on the overall program flow. But of course delay() would be a great 'poster child' to use for the teaching example.

My point is not so much if delay() is evil or not, but rather that 'blocking functions' can be evil if you don't understand the concept clearly and impact they can have on ones overall sketch.

Lefty

My point is not so much if delay() is evil or not, but rather that 'blocking functions' can be evil if you don't understand the concept clearly and impact they can have on ones overall sketch.

Sure. I think that the concept of changing from using blocking-is-okay to a blocking-is-a-rarely-needed-fact-of-life is easiest to demonstrate with delay() being replaced be a more intelligent approach.

Certainly the awareness of, and understanding the differences between, blocking and non-blocking functions and approaches should be taught very early. Personally, I think that should begin as soon as the first LED blinks.