rowan07
Published © GPL3+

Make a Simple LED Circuit

Make an LED turn on and/or blink.

BeginnerFull instructions provided133,876
Make a Simple LED Circuit

Things used in this project

Story

Read more

Schematics

Diagram

Code

Simple Code

Arduino
Copy and paste this code into your Arduino IDE or Web Editor
int led = 13; // the pin the LED is connected to
void setup() {
  pinMode(led, OUTPUT) // Declare the LED as an output
}

void loop() {
  digitalWrite(led, HIGH) // Turn the LED on
}

LED Blink Code

Arduino
Copy and paste this code into your Arduino IDE or Web Editor
int led = 13; // the pin the LED is connected to
void setup() {
  pinMode(led, OUTPUT) // Declare the LED as an output
}

void loop() {
  digitalWrite(led, HIGH) // Turn the LED on
  delay(1000)// Wait for 1000 milliseconds (1 second)
  digitalWrite(led, LOW) // Turn the LED off
}

Credits

rowan07

rowan07

1 project • 11 followers

Comments