// 2009 mlab.uiah.fi/paja // Understanding Branching (if statement) int valInt = 0; void setup(){ Serial.begin(9600); } void loop(){ /* if(condition){ statement(s); } condition: statement runs when the condition is true. */ if (valInt < 7){ Serial.println("running..."); } else if (valInt < 10){ Serial.println("almost there."); } else { Serial.println("Goooooooooal!"); valInt = 0; Serial.println(); delay(5000); } valInt++; delay(1000); }