This is the original Blink Program.
int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop()
{
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
delay(1000);
} This is a modified version which has the LED is mostly off, only blinking on briefly.
int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop()
{
digitalWrite(ledPin, HIGH);
delay(125);
digitalWrite(ledPin, LOW);
delay(1000);
}
This is a modified version which has the LED mostly on, only turning off briefly.
int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop()
{
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
delay(125);
}
This is a modified version which has the LED blinking at 10ms.
int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop()
{
digitalWrite(ledPin, HIGH);
delay(10);
digitalWrite(ledPin, LOW);
delay(10);
}
(A slight flicker can be seen, but almost unaparent.)
Sunday, March 7, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment