rising/trailing edge detection

I'm looking for a bit of help with so code for a project. im using 2 outputs and input. when the in put gos high i need 1 output to go high for a set amount of time, when the input gos low i need the other out put to go high fo a set amount of time. if anyone could help me out that would be great

thank you

Post what you've got, and we can help.

Don't forget code tags

The state change detection tutorial shows how to detect the edges (transitions).

Non-blocking timing tutorials:
Several things at a time.
Beginner's guide to millis().
Blink without delay().

And:

Use CTRL T to format your code.
Attach your ‘complete’ sketch between code tags, use the </> icon in the posting menu.
[code]Paste your sketch here[/code]

pafy:
I'm looking for a bit of help with so code for a project. im using 2 outputs and input. when the in put gos high i need 1 output to go high for a set amount of time, when the input gos low i need the other out put to go high fo a set amount of time. if anyone could help me out that would be great

this seems like convention button detection, monitoring for a change in state

// recognize button presses and release

#define butPin  A1

// -----------------------------------------------------------------------------
void setup (void)
{
    Serial.begin (9600);
    pinMode      (butPin, INPUT_PULLUP);
}

// -----------------------------------------------------------------------------
void loop (void)
{
    static byte butLst = HIGH;
           byte but    = digitalRead (butPin);

    if (butLst != but)  {
        butLst = but;

        if (LOW == but)
            Serial.println ("pressed");
        else
            Serial.println ("released");
                
        delay (10);         // debounce
    }
}