- Sat May 04, 2019 4:41 am
#82144
A lot of the GPIO pins go high through a weak internal pull up of around 36K until the device has booted and you set the pinMode yourself.
If your relays are set to be active high then you need the GPIO to be low during the boot up period to avoid the relay being set on during this period.
In general try to avoid using GPIO 0 and 2 (D3, D4) as these have to be high during the boot period for normal use.
GPIO15 (D8) would be a good pin to use as it has to be low during the boot period and the board will have an pull down already on the board.
For other pins you need to use a separate external pull down resistor which needs to go from the pin to 0V as well as the pin being connected to the relay input. So for example, use GPIO4 (D2) and a pull down resistor of say 4K7 to 0V.