Help with a program capable of producing two pulses lasting 1 second each

cachimbon:
I tried the Edge Detection sketch, but never achieved what was planned.
Could anybody help me with this nightmare?
Thanks in advance! cc

Sounds like homework to me. Please post what you attempted but "never achieved".