Trying to make an LED blink continuously
Equipment:
LED
Resistor
Wire (x3)
Arduino Uno
Breadboard
USB cable
Program Details:
i used the program of newinnovators.ca
Time to Program and Complete:
3 minutes
Results:
N/A
Photo/Video Proof:
Photo or video of you actually doing this lab
int ledPin = 13;
//this tells the program what ledPin is equal to
void setup()
//the code underneath is isolated from the other code
{
//anything underneath is part of the above code
pinMode(ledPin, OUTPUT);
//identifies the pinMode as either and output or input
}
//this is the end of the isolated code
void loop()
//the isolated code will loop forever
{
//start of the loop function
digitalWrite(ledPin, HIGH);
//sets the LED value to high
delay(1000);
//delays the code for 1000 milliseconds
digitalWrite(ledPin, LOW);
//sets the LED value to low
delay(1000);
}
Program Modifications:
N/A
Helpful Tips:
Make sure that the polarity of the LED is correct
References:
newinnovators.ca
You need to specify the resistor values.
ReplyDelete