Ring of LEDs: Issues with lighting up 7 LEDs

Hi!
I'm making a ring of 7 LEDs that turns on all the LEDs at the same time and turns them off 45min. I haven't used Arduino in more than 2 years, so I was reading the project book to guide myself on how to do this. However, when I upload my code, the LEDs are not even turning on. This is the code that I'm using.

int led1 = 6;
int led2 = 7;
int led3 = 8;
int led4 = 9;
int led5 = 10;
int led6 = 11;
int led7 = 12;

void setup()
{
  pinMode(led1, INPUT);
  pinMode(led2, INPUT);
  pinMode(led3, INPUT);
  pinMode(led4, INPUT);
  pinMode(led5, INPUT);
  pinMode(led6, INPUT);
  pinMode(led7, INPUT);
}

void loop()
{
  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led3, HIGH);
  digitalWrite(led4, HIGH);
  digitalWrite(led5, HIGH);
  digitalWrite(led6, HIGH);
  digitalWrite(led7, HIGH);;
    delay(2700000000);
    digitalWrite(led1, LOW);
    digitalWrite(led2, LOW);
    digitalWrite(led3, LOW);
    digitalWrite(led4, LOW);
    digitalWrite(led5, LOW);
    digitalWrite(led6, LOW);
    digitalWrite(led7, LOW);
  } 

IMG_5798|476x500
I'm attaching a photo of how my breadboard looks like. Additionally, I'm doing this on an Arduino Uno board. Can anyone help me to figure out what's wrong with this?
Thanks in advance!

Change all INPUT to OUTPUT.

delay(2700000000); uau Immensely great value. =~31 days.
try delay(1000);

RV mineirin

1 Like

Thank you so much. This worked perfectly!!

delay(...) expects a parameter in milliseconds but the number that you supplied was in microseconds. 2700000 would have been 45 x 60 x 1000 milliseconds (in C/C++ this would be 45L601000).

Unfortunately, my answer was changed by the forum. The part in parentheses should be

45L * 60 * 1000

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.