/*This line defines a constant named led with a value of 13.
This is a common practice in Arduino programming to assign names to pin numbers
for better code readability.cpp*/
#define led 13
void setup() {
/*he setup function is called once when the Arduino is powered up or reset.
In this case, it sets up the pin mode for the LED.
The pinMode function is used to configure a specific pin as an input or output.
Here, pin 13 (led) is set as an output.*/
pinMode(led, OUTPUT);
}
void loop() {
//This sets the voltage on pin 13 (connected to the LED) to HIGH, turning the LED on.
digitalWrite(13, HIGH);
/*This introduces a delay of 1000 milliseconds (1 second).
During this time, the LED stays on.*/
delay(1000);
//This sets the voltage on pin 13 to LOW, turning the LED off.
digitalWrite(13, LOW);
delay(1000);
}