Arduino starting 5 second high pin code

Hi everyone , i think you are fine, i need a code that, when Arduino uno will power up then a digital pin will be high for 5 seconds. five seconds afte that's pin stay low.

Please help for this code.

Give it your best try, and list the code here in code tags…

It might work, or we can make suggestions to help you.

const byte PIN = 4; // 5 sec high pin

void setup ()
{
  pinMode ( PIN, OUTPUT );
  digitalWrite ( PIN, HIGH );
  delay ( 5000 );
  digitalWrite ( PIN, LOW );
}

void loop ()
{
  // other very important stuff or maybe not
}
1 Like

Thank you so much.