-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
I'm using a
2N3905 transistor that should be the equivalent of 2N2222.
The installation works fine, but after the boot the fan is running and the temp is 33.6'C.
With python I try to understand the state of the fan object importing just the code needed.
from gpiozero import OutputDevice
GPIO_PIN = 17 # Which GPIO pin you're using to control the fan.
fan = OutputDevice(GPIO_PIN)
after that the fan is active, and fan.active() return 0 that should mean OFF.
After that I read the OutputDevice docs and find that you can set the initial state of the object OutputDevice. So I edit the line
from
fan = OutputDevice(GPIO_PIN, [active_high=True, initial_value=False])
to
fan = OutputDevice(GPIO_PIN, active_high=False, initial_value=False)
Hope this can help someone else
Metadata
Metadata
Assignees
Labels
No labels