Pages: [1]   Go Down
Author Topic: New Adafruit Arduino Lessons  (Read 1395 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
God Member
*****
Karma: 13
Posts: 903
Twitter: @simonmonk2
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.adafruit.com/blog/2012/11/28/new-series-arduino-lessons-by-simon-monk-ladyada-in-the-adafruit-learning-system/
Logged

--
My New Arduino Book: http://www.arduinobook.com

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 211
Posts: 13471
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Simon,

You're quite busy promoting Arduino (and Android and Raspberry and ...), I like that. However ....there always is a however smiley-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


Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

UK
Offline Offline
God Member
*****
Karma: 13
Posts: 903
Twitter: @simonmonk2
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

--
My New Arduino Book: http://www.arduinobook.com

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 211
Posts: 13471
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very true smiley-wink
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17259
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
« Last Edit: November 30, 2012, 11:18:35 am by retrolefty » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Pages: [1]   Go Up
Jump to: