Need Help for Halloween, two inputs and two outputs not working together

Help....
Trying to build two motion detecting triggers to push a electrical button (350mil), then they need to delay one for 30000mil (30 seconds) and one for 60000mil (60 seconds), then wait for the next trigger.

I can get one to work at a time but not both,

one will trigger after the 30 second delay or sometimes after code changes it will trigger for 30 seconds. this is my first time trying to code and I'm running out of time. this project is for Halloween

binky

Edit: I forgot to add my sketch:

void setup() {

int sensor = 8;
int sensor1 = 12;
int pinmode = 3;
int pinmode1 = 5;
pinMode(sensor,INPUT);
pinMode(sensor1,INPUT);
pinMode(3,OUTPUT);
pinMode(5,OUTPUT);
}

void loop()
{
{int sensor = 8;
if (digitalRead(sensor) == HIGH) digitalWrite(3,HIGH);
delay(350);
int sensor1 = 12;
if (digitalRead(sensor1) == HIGH) digitalWrite(5,HIGH);
delay(350);}

{if (digitalRead(OUTPUT) == HIGH)digitalWrite(3,LOW);
delay(30000);
if (digitalRead(OUTPUT) == HIGH)digitalWrite(5,LOW);
delay(60000);}
}

The usual place to look at for multiple delays is the example program blink without delay that is in your Arduino release: http://arduino.cc/en/Tutorial/BlinkWithoutDelay.

While it gives the basic idea of not using the delay function, but instead checking when the next thing to happen should occur, I suspect a lot of people still have conceptual blocks with it, and it would have been helpful if the example had 2 or more things going on at the same time with different timeouts

this is my first time trying to code and I'm running out of time

But you didn't think to post your code, thereby delaying possible help?

MichaelMeissner:
The usual place to look at for multiple delays is the example program blink without delay that is in your Arduino release: http://arduino.cc/en/Tutorial/BlinkWithoutDelay.

Michael
This gives a example of one input one output, I need two independent inputs and outputs.

The simple way would be to add a second set of timing variables to the blink without delay example.
Please use code tags when posting code.

void setup() 
{
  int sensor1 = 8;
  int sensor2 = 12;
  int relay1 = 3;
  int relay2 = 5;
  pinMode(sensor1,INPUT);
  pinMode(sensor2,INPUT);
  pinMode(relay1,OUTPUT);
  pinMode(relay2,OUTPUT);
}

void loop() 
{
    //variable declaration
    int sensor1 = 8;
    int sensor2 = 12;
    int relay1 = 3;
    int relay2 = 5;
    
    //sensor read section
    if (digitalRead(sensor1) == HIGH)  //sensor 1 reads high
    {
      digitalWrite(relay1,HIGH);  //output high to latch 5v relay 1
      delay(350);
    }
    if (digitalRead(sensor2) == HIGH)  //sensor 2 reads high
    {
      digitalWrite(relay2,HIGH);  //output high to latch 5v relay 2
      delay(350);
    }
    
    //relay read section
    if (digitalRead(relay1) == HIGH)  //output to relay reads high after delay
    {
      digitalWrite(relay1,LOW);  //output low to unlatch 5v relay 1
      //delay(10000);    
    }
    if (digitalRead(relay2) == HIGH)  //output to relay reads high after delay
    {
      digitalWrite(relay2,LOW);  //output low to unlatch 5v relay 2
      //delay(10000);
    }
    delay(5000);
}

Now I know, there is a problem with delays, but I don't know the work around.

dwcbinky:
Now I know, there is a problem with delays, but I don't know the work around.

As suggested upthread, look at the 'blink without delay' example for a work-round.
Why are you reading output pins?