This circuit consists of an Arduino UNO microcontroller board and a two-pin red LED. The Arduino UNO is used to control the LED, turning it on or off. The LED is connected to one of the digital pins of the Arduino (D13) and to the ground (GND). This simple setup can be used to demonstrate basic digital output functionality of the Arduino UNO.
void setup() {
// Initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
void loop() {
// Turn the LED on (HIGH is the voltage level)
digitalWrite(13, HIGH);
// Wait for a second
delay(1000);
// Turn the LED off by making the voltage LOW
digitalWrite(13, LOW);
// Wait for a second
delay(1000);
}
File Name: sketch.ino
Description: This code is written for the Arduino UNO microcontroller. It initializes digital pin 13 as an output in the setup()
function. In the loop()
function, it turns the LED on and off with a one-second interval between each state change.