#include <Arduino.h>
void setup()
{
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(13, HIGH);
delay(1);
digitalWrite(13, LOW);
delay(1);
}
I am trying to make an led glow for one second to glow and then go off but nothing happens
#include <Arduino.h>
void setup()
{
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
The problem with your code is that the delay function works in milliseconds and not seconds . 1sec = 1000ms .
#include <Arduino.h>
Commented
Oct 28, 2020 at 21:52
by increasing the delay value, you can visualize it better.
{
digitalWrite(13, HIGH);
delay(2000);
digitalWrite(13, LOW);
delay(1000);
}
delay()
expects the interval in milliseconds. Please do so the enxt time.