Difference between revisions of "10mm Green LED Module"

From LinkSprite Playgound
Jump to: navigation, search
Line 2: Line 2:
  
 
[[File:LED10MM G.jpg | 400px]]
 
[[File:LED10MM G.jpg | 400px]]
 +
 +
 +
== Sample ==
 +
 +
/*
 +
  grove Relay
 +
  the LED will slowly blink
 +
 +
  This example code is in the public domain.
 +
*/
 +
 +
int RelayControlPin = 13;
 +
void setup() {               
 +
  // initialize the digital pin as an output.
 +
  // Pin 13 has an LED connected on most Arduino boards:
 +
  pinMode(RelayControlPin, OUTPUT);   
 +
}
 +
 +
void loop() {
 +
  digitalWrite(RelayControlPin, HIGH);  // set the LED on
 +
  delay(500);              // wait for a second
 +
  digitalWrite(RelayControlPin, LOW);    // set the LED off
 +
  delay(500);              // wait for a second
 +
}
  
  

Revision as of 12:55, 25 April 2013


400px


Sample

/*

 grove Relay
 the LED will slowly blink

 This example code is in the public domain.
*/

int RelayControlPin = 13; void setup() {

 // initialize the digital pin as an output.
 // Pin 13 has an LED connected on most Arduino boards:
 pinMode(RelayControlPin, OUTPUT);     

}

void loop() {

 digitalWrite(RelayControlPin, HIGH);   // set the LED on
 delay(500);              // wait for a second
 digitalWrite(RelayControlPin, LOW);    // set the LED off
 delay(500);              // wait for a second

}


Schematics