Make an LED turn on and off periodically using an Arduino and a few simple components.
What you'll need:
Wiring:
Arduino. (2024, January 30). How are the LEDs represented in the Starter Kit projects book? [Image]. https://support.arduino.cc/hc/article_attachments/12416016395676
Circuit diagram created using Tinkercad (https://www.tinkercad.com/).
Code:
void setup() { pinMode(13, OUTPUT); } void loop() { digitalWrite(13, HIGH); delay(1000); digitalWrite(13, LOW); delay(1000); }
Söderby, K., & Hylén, J. (2024, January 17). Getting Started with Arduino IDE 2. Arduino Documentation. https://docs.arduino.cc/software/ide-v2/tutorials/getting-started-ide-v2/
Troubleshooting:
Once the upload finishes, the LED should turn on and off once per second. If it isn't working as expected, check the following:
Video demonstration:
Science Buddies. (2022, October 22). How to blink an LED with Arduino (Lesson #2) [Video]. YouTube. https://www.youtube.com/watch?v=FKekzzj5844
More how-to guides coming soon.