Hi,
I have experience for 15+ years in electronics/embedded development. I have several years of advanced AVR/arduino development, including library development from scratch. Practically all Arduino AVR boards used, like: 2009, 2010, UNO, MEGA, NANO, MICRO, MINI, etc. Several shields used like Ethernet (W5100, ENC28J60, etc.) with various IP protocols implementation, various graphical TFTs with and without touchscreen and various BUS types (parallel, SPI, I2C, etc.), all kinds of sensors and buses, serial and parallel memories, etc.
I can easily implement your your project. Essentially, a 5 seconds timer, that will be auto reset if in its period the all 3 events didn't occur. I have made similar sketches and will have no trouble implementing yours.
If you are interested in my bid, feel free to contact me.
Regards,
Carlos.