As the title says... Chat on...

User avatar
By iHaveESP
#6608 Greetings,

I'm currently 'PWM'ing a logic mosfet, however the module FLOATs the GPIO as output and the light is on for a second upon startup. I'm also pulling down the gate to ground with 100K. This effect can be seen by just using an LED.

The quickest thing I can do is init with:

gpio.mode(6, gpio.OUTPUT)
gpio.write(6, gpio.LOW)

...then setup pwm in my dofile.

...but that doesn't help. It appears that the pins are set before the init is run. What are your thoughts that GPIOs should default to "inputs"? I come from Arduino world and all pins default to inputs, a high imp state.

Thanks!!!