cdj wrote: Another Issue described by Mr. EasyIoT :
Later I've discovered one little detail about ESP8266. While power up GPIO2 must be connected to VCC to start in correct mode. In my test case it happened that door was open and GPIO2 was on VCC. If you start this example with door closed it won't work because ESP8266 wont start int correct mode. There are two solutions:
-connect reed relay and capacitor to VCC and GPIO. That way GPIO2 will be always connected to VCC at startup. Also correct line gpio.mode(4,gpio.INT,gpio.PULLUP) to gpio.mode(4,gpio.INT,gpio.PULLDOWN)
-use different ESP8266 model and connect reed relay to different GPIO pin. Also correct program to work with different GPIO.
I'm trying unsuccessfully to fix this (because if esp restart with door closed it doesn't start correctly) :
Assuming that reed has two cable, 1 and 2:
1) connect reed1 to +3.3v
2) connect gpio2 to +3.3v
3 connect reed2 to gnd
this produce a loop of "1" status....
1) connect reed1 to +3.3v
2) connect gpio2 to reed2
this produce a NULL status... nothing appear when i close or open reed
gpio.mode(4,gpio.INT,gpio.PULLDOWN) line modified
obviously in pull-up mode with gpio2 to reed1 and gnd to reed2 works perfectly, but when reset with closed door it doesn't start correct as you discovered.
Please someone explain better how to fix it ?
Dario
Please Log in or Create an account to join the conversation.
EasyIoT wrote:
cdj wrote: Another Issue described by Mr. EasyIoT :
Later I've discovered one little detail about ESP8266. While power up GPIO2 must be connected to VCC to start in correct mode. In my test case it happened that door was open and GPIO2 was on VCC. If you start this example with door closed it won't work because ESP8266 wont start int correct mode. There are two solutions:
-connect reed relay and capacitor to VCC and GPIO. That way GPIO2 will be always connected to VCC at startup. Also correct line gpio.mode(4,gpio.INT,gpio.PULLUP) to gpio.mode(4,gpio.INT,gpio.PULLDOWN)
-use different ESP8266 model and connect reed relay to different GPIO pin. Also correct program to work with different GPIO.
I'm trying unsuccessfully to fix this (because if esp restart with door closed it doesn't start correctly) :
Assuming that reed has two cable, 1 and 2:
1) connect reed1 to +3.3v
2) connect gpio2 to +3.3v
3 connect reed2 to gnd
this produce a loop of "1" status....
1) connect reed1 to +3.3v
2) connect gpio2 to reed2
this produce a NULL status... nothing appear when i close or open reed
gpio.mode(4,gpio.INT,gpio.PULLDOWN) line modified
obviously in pull-up mode with gpio2 to reed1 and gnd to reed2 works perfectly, but when reset with closed door it doesn't start correct as you discovered.
Please someone explain better how to fix it ?
Dario
Try to use some other gpio pin and not GPIO0 or GPIO2.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
EasyIoT wrote:
cdj wrote: Another Issue described by Mr. EasyIoT :
Later I've discovered one little detail about ESP8266. While power up GPIO2 must be connected to VCC to start in correct mode. In my test case it happened that door was open and GPIO2 was on VCC. If you start this example with door closed it won't work because ESP8266 wont start int correct mode. There are two solutions:
-connect reed relay and capacitor to VCC and GPIO. That way GPIO2 will be always connected to VCC at startup. Also correct line gpio.mode(4,gpio.INT,gpio.PULLUP) to gpio.mode(4,gpio.INT,gpio.PULLDOWN)
-use different ESP8266 model and connect reed relay to different GPIO pin. Also correct program to work with different GPIO.
I'm trying unsuccessfully to fix this (because if esp restart with door closed it doesn't start correctly) :
Assuming that reed has two cable, 1 and 2:
1) connect reed1 to +3.3v
2) connect gpio2 to +3.3v
3 connect reed2 to gnd
this produce a loop of "1" status....
1) connect reed1 to +3.3v
2) connect gpio2 to reed2
this produce a NULL status... nothing appear when i close or open reed
gpio.mode(4,gpio.INT,gpio.PULLDOWN) line modified
obviously in pull-up mode with gpio2 to reed1 and gnd to reed2 works perfectly, but when reset with closed door it doesn't start correct as you discovered.
Please someone explain better how to fix it ?
Dario
Try to use some other gpio pin and not GPIO0 or GPIO2.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.