Arduino LED
Objective:
Code the Arduino LED on pin 13 to generate a constant and alternating output.
Alterations:
Delete the two lines of delay(1000); code to produce a constant LED output.
Code:
void setup() {
// put your setup code here, to run once:
// Set pin 13 (LED) as the output.
pinMode(13, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
// Send signal to pin 13 to turn it on.
// Set it as HIGH means 5V or LOW to turn it off.
// Delay for 1000 ms (1 second)
// Turn the light for 1 ms and turn off for 1 ms in a loop.
// (Blinking LED)
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
Video:
The presentation video link is below.