trigger OFF from on/off 1sec

Hello. Am really new to arduino :confused: I have the basic knowledge of electronics of how to connect all this set up. My problem is programming, I need to learn cause I know little. plz help.

I need to create a simple program that can detect a blinking on/off 1sec interval signal and convert it to OFF for detecting this state.

This signal is the blinking led of my computer when it is in sleep mode.

When the led is not blinking (fully on) I need to send a signal to the gate of a FET transistor to power the fans.

But when the led is blinking I need to stop this signal to the FET to stop the fans. Because I don’t want the FET to power on/off the fans every 1 sec, just sleep (off) during that state.


How are you reading the state of the LED? Recording when the LED state changes is easy. The state change detection example shows how to detect a state change. If the change from on to off and from off to on happens within some window, the LED is blinking. If the LED stays off for some period of time, the computer is off. No fan needed. If the LED is on for some period of time, then the computer is awake, and supposedly controlling the fan.