Download Sample Code HERE!

Grove_LED_Blink
Do NOT just copy and paste the code below. Simply click the arrow to download the file.

                    
                        /* 
 *  Digital Write
 *  
 *  Written by: Mitchell Way
 *  
 *  Well, I hope that you chose to put your LED Socket kit
 *  in the digital writing pile. If not, you are still correct,
 *  but we're going to start with digital.
 *  
 *  This program is meant to allow you to blink an LED on Pin D4
*/

// This code makes it so that if we need to change what pin the LED
// is on, we can change one number at the top of the code rather than
// hunting for all of the 4's in our program.
 
int ledPin = 4;

void setup() {
  // put your setup code here, to run once:

//This code declares that the LED pin will be an output rather than an input.
pinMode(ledPin, OUTPUT);

}

void loop() {
  // put your main code here, to run repeatedly:

//This code turns the LED on
digitalWrite(ledPin, HIGH);

//This code stops the program for one second(1000 milliseconds)
delay(1000);

//This code turns the LED on
digitalWrite(ledPin, LOW);

//This code stops the program for one second(1000 milliseconds)
delay(1000);

//Remember that the loop will continue running this code over and over.
}