How to combine these two codes? Hurry I am on a time crunch!

So I have these two codes that works just fine, but I want to add a delay at the beginning for 50 seconds (50000 milliseconds) I have the code for the more reliable delay code, (not just delay()) but I am having trouble combining them. I am kinda on a time crunch, so i would need to figure this out in the next 4-5 hours!

Here is the working led strip code to be turned on by a push button:

*/

// constants won't change. They're used here to set pin numbers:
const int buttonPin = 2;     // the number of the pushbutton pin
const int ledPin =  13;      // the number of the LED pin

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
}

void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed. If it is, the buttonState is HIGH:
  if (buttonState == HIGH) {
    // turn LED on:
    digitalWrite(ledPin, HIGH);
  } else {
    // turn LED off:
    digitalWrite(ledPin, LOW);
  }
}

Here is the code for the delay:

#define delay DELAY
void setup() {
Serial.begin(115200);
}
void loop() {
delay (50000, true);
}
void DELAY(long delayTIME, boolean readpins){
//set var to current time
long tmpTIME = millis();

//loop until delaytime is reached
do(
//code to execute while waiting
}while (millis()- tmpTIME < delayTIME);

if (readPINS == true){
READPINS();
}
Serial.print1n(“done waiting”);
}

void READPINS(){
//analogRead(AO);
Serial.print1n(“reading pins”);
}

If anyone could combine these, I would be EXTREMELY grateful!!! Thank you all!

Did you write these two codes? How much of either do you understand?

@Perehama:
Did you write these two codes? How much of either do you understand?

No, I did not write them. I got one from a video, (there was proof that it was a working code) and the other was on an arduino website! I have a well enough understanding to know what these things mean, but not enough to write it on my own yet.

Rather than keep bumping this, why not tell us what you have done/tried in the last seven or eight hours?

Tell us what it did that you didn't expect, and what it didn't do that you did expect.

This forum is not a free code writing service. Its purpose is to help you get your program to work. So, take your best shot at writing it yourself. If it doesn't work like you want, post it here and completely describe what it does and how that is different than what you want it to do.

Otherwise, if your "time crunch" is so urgent, you can go to: Gigs and Collaborations and pay somebody to write your code.

BTW, regarding your "time crunch":
s-l500.jpg

s-l500.jpg

As your second code does not compile I doubt that combining it with the first one is going to be very fruitful

So I have these two codes that works just fine,

That’s interesting, since neither will compile as posted.

but I want to add a delay at the beginning for 50 seconds (50000 milliseconds)

Where exactly do you need this 50 second delay? Does it need to be done once, at the beginning of the sketch, or each time you go through the loop?

I have the code for the more reliable delay code,

//loop until delaytime is reached
do {
  / /code to execute while waiting
} while (millis()- tmpTIME < delayTIME);

That is in no way more reliable than a delay() instruction, the main disadvantage of delay() is that no other code can be executed during the delay. The do…while with nothing but a comment has exactly the same effect.

More bad news. The first one does not compile either.

The good news is that it has only 1 error in it unlike the second one that has multiple errors

You must have tried it compiling before posting.