Closed GoogleCodeExporter closed 9 years ago
Also, attached is a modification of the "Blink" example. This version also
prints "LED On" or "LED Off" to the console.
Original comment by ad...@mdtech.us
on 3 Oct 2012 at 3:14
Attachments:
Original comment by dmel...@gmail.com
on 3 Oct 2012 at 12:51
PLEASE correct comments in Fade-with_console_output.ino
They refer to pin 9 but the code actually use pin 11
(As an aside a comment like "// declare pin 9 to be an output:" just preceeding
"pinMode(led, OUTPUT);" is not only redundant, but, as seen in this example,
troublesome.
Similarly "// start serial port at 9600 bps:" , " // set the brightness of pin
9:"
They actually make the source LESS readable as they reduce the significant
lines of code viewable on the screen.)
Original comment by jaguar3s...@gmail.com
on 3 Oct 2012 at 2:16
Ok, attached is the code with modified comments.
Original comment by ad...@mdtech.us
on 3 Oct 2012 at 8:46
Attachments:
The reasoning behind the current examples was to do just one thing in each of
the basics. For that reason I would prefer not to add printing to Blink and
Fade.
In general, though we do add new examples when we add new features, we've tried
to keep the number of examples that are in the downloaded IDE small, so as not
to add to the overall download size. There are many more examples in the
playground and on the main Arduino.cc site. The question that I would ask about
each example added to the downloaded IDE is this: What does this example show
that no other example shows? If it is an expansion or a repetition, can it be
placed in the online site instead of in the downloaded IDE?
Original comment by tom.i...@gmail.com
on 3 Oct 2012 at 10:31
[deleted comment]
Additional information regarding this example:
PROBLEM: The test which includes
brightness == 60
should be
brightness > 60
since it will brightness will never be equal to 60 if user modifies program to
use
fadeAmount = 7;
Limit test are always better with "greater than" or "greater than or equal" (or
less...).
Why did you choose to use
double brightness = 0;
better to use
int brightness = 0;
Note that "double implementation on the Arduino is currently exactly the same
as the float", "Floating point math is also much slower", "may yield strange
results when compared" (I would prefer the word unexpected instead of "strange".
Regarding "the built-in LED on pin 13". Be advised that not all Arduino boards
use D13 as LED_BUILTIN (Arduino ethernet uses D9). Perhaps this example should
use a totally different pin.
Original comment by jaguar3s...@gmail.com
on 4 Oct 2012 at 11:33
As mentioned above examples add to the complexity of both the blink and the
fade examples unnecessarily. In the basic examples, we've kept example to
introducing one concept. These require teachers not only to explain blink and
fade, but also serial, in the same example.
I would prefer to keep the basic examples single-concept and short, as many
teachers have requested that. You are welcome to post these examples to the
playground, but I think they don't add sufficient value to the existing
examples.
Original comment by tom.i...@gmail.com
on 4 Oct 2012 at 11:43
ok, here is one last suggestion. If you CAN make more examples, please make a
separate download with more examples so if people want more examples, they
could download some extra ones.
Original comment by ad...@mdtech.us
on 4 Oct 2012 at 7:53
Original issue reported on code.google.com by
ad...@mdtech.us
on 3 Oct 2012 at 3:01Attachments: