Description:
For this lab, I used an Arduino to make a red LED light blink very fast (50 ms, or 0.05 seconds).
Tools:
- 1 Arduino
- 1 red LED
- 1 resistorĀ (220Ī©)
- 1 breadboard
- 3 wires
- 1 PC
- USB – Arduino wire
Code:
void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(50); // wait for 0.05 second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(50); // wait for 0.05 second
}