Sunday, August 2, 2015

Hello World Repeated #Learn Arduino

Modifying from the previous, here I would like to make the "hello world"  appear repeatedly.

---------------------------------------------------------------------------------------------------

//Learn Arduino-Hello world Repeatedly-Hanifadinna

void setup () {
  Serial.begin(9600); //open serial port with speed 9600 bit per second
}

void loop () {
 delay(10000);  // delay time 10 second
 Serial.println("Hello world");  //print out the hello world
}
---------------------------------------------------------------------------------------------------
 Verivy, uplod and we just simply type "ctrl+shift+M" to show the print of "hello world", and then we got this from serial monitor.



To make the hello world appear repeatedly is because we put :

 delay(10000);  // delay time 10 second
 Serial.println("Hello world");  //print out the hello world

inside the void loop, so the hello world will appear repeatedly every 10 second. 

No comments: