/*
* Project: HelloWorld_621Task08
* Author: Jane-Maree Howard
* Date: Tuesday 30/08/2011
* Platform: Arduino 22
* Purpose: To demonstrate a simple function call via the Serial Monitor (SM)
* Operation: Description: uses a function in the main loop
to output text 10 times to the SM
Declare: function called Hello()
Setup(): SM @ 9600 baud
Loop(): call function Hello() 10 times, & print a blank line.
*/
void setup()
{
Serial.begin(9600); // Serial Monitor @ 9600 baud
}//end setup()
void loop()
{
for (int j=0; j<10; j++)
{
Hello();
}//for j
Serial.println();
}//end loop()
// 'Hello()' print routine
void Hello()
{
Serial.println("Hello, world.");
}//Hello()
//END
No comments:
Post a Comment