25 March 2010
Task 36 - Generate 100 random numbers 0-9, calculate their Mean (average), & output the result to the Serial Monitor (2)
The Serial Monitor output shows the Mean calculated from the 100 random numbers generated by the program.
This variable must be a 'float' in order to show the result to (default) 2 decimal places; an 'int' or 'long' merely gives an integer - I found that this usually turned out to be 4, & occasionally 5 - unsatisfactory.
Labels:
Arduino,
Random numbers,
Serial Monitor,
software,
TASKS
Subscribe to:
Post Comments (Atom)
Not the best, but it'll have to do
ReplyDelete