/* THIS IS A BLOCK COMMENT: Inside here I can do whatever I want Block Commenting with the wonderful * and / */ // This is a single line comment. two '/'s makes the following text into a comment. // NOTE: semicolons are important because they establish an End Of Line to the development environment int myNewIntegerVariable = 10; //created an integer GLOBAL variable. This means it is accessible anywhere in the program and there can only be ONE variable with this name. void setup() //The setup function is where you put things that you only want to happen ONCE when the Arduino turns on. { Serial.begin(9600); //Create a serial connection. This means you can send information to the Arduino serial monitor. Serial.println("HELLO!"); //Send "HELLO!" to the serial monitor } //These curly brackets are used to separate functions and other code chunks void loop() //This happens forever. The 'infinite' loop { myNewIntegerVariable = myNewIntegerVariable + 1; //increment the variable by one every loop. Serial.print("MY NEW VALUE = "); //Send a line of text to serial monitor (But don't go to the next line) Serial.println(myNewIntegerVariable); //Send the current value of the variable to the monitor - then go to the next line. //The IF statement is a 'conditional' statement if (myNewIntegerVariable == 50) //the double '=' is to test whether something is the same as something else { myNewIntegerVariable = 0; //The single '=' is used to SET something to something else. } delay(myNewIntegerVariable*10); //The delay function waits for a number of milliseconds }