If GPIO0 is connected to ground on boot the ESP8266 goes into flash mode. GPIO0 will toggle the output so you can use a momentary switch which would solve the problem.
Regards
Phil
Hi i posted a question here before, there i was told to connect the switch between GPIO 0(D3) and GND(G), but if the switch allows power to pass while booting the wemos d1 min wont boot.Does any one have a idea what is wrong?
--
You received this message because you are subscribed to the Google Groups "SonoffUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
If GPIO0 is connected to ground on boot the ESP8266 goes into flash mode. GPIO0 will toggle the output so you can use a momentary switch which would solve the problem.
Regards
Phil
On Jul 9, 2018 9:33 PM, "Peter Andersson" <pet...@gmail.com> wrote:
Hi i posted a question here before, there i was told to connect the switch between GPIO 0(D3) and GND(G), but if the switch allows power to pass while booting the wemos d1 min wont boot.--Does any one have a idea what is wrong?
You received this message because you are subscribed to the Google Groups "SonoffUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
So when the float is up the contact is closed? Is connected directly from GPIO1 to ground without a pull up resistor? If not try a 4k7 resistor between ground and GPIO1 and connect the float switch between Vcc and GPIO1. GPIO1 now won't 'float' and will be high when float switch is closed and go low when open. Not sure it will fix it but worth a try
im using a float switch that allows current to pass depending on the water level in a tank, sadly i have no way of turning it off while booting.
I also tried to use GPIO 1 (D4) but same result.
On Monday, July 9, 2018 at 10:37:27 PM UTC+2, Philip Knowles wrote:If GPIO0 is connected to ground on boot the ESP8266 goes into flash mode. GPIO0 will toggle the output so you can use a momentary switch which would solve the problem.
Regards
Phil
On Jul 9, 2018 9:33 PM, "Peter Andersson" <pet...@gmail.com> wrote:Hi i posted a question here before, there i was told to connect the switch between GPIO 0(D3) and GND(G), but if the switch allows power to pass while booting the wemos d1 min wont boot.--Does any one have a idea what is wrong?
You received this message because you are subscribed to the Google Groups "SonoffUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "SonoffUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers+unsubscribe@googlegroups.com.
That explains it. GPIO0 and GPIO2 need a pull up resistor to boot properly if being used with switches
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers+unsubscribe@googlegroups.com.
If you have access to Rx you could try the option quite a way down this page http://www.forward.com.au/pfod/ESP8266/GPIOpins/ESP8266_01_pin_magic.html
I've used it before
To boot properly both GPIO 0 and 2 need to be high. GPIO 0 if held low when GPIO 2 is high at boot will make the ESP8266 go into flash mode. I suspect that your float switch is pulling GPIO 0 down on boot. The pull up resistor only works when the float switch is open - it pulls GPIO 0 to Vcc - when the float switch closes it pulls GPIO 0 to ground.
Electronically, using Rx is the same as using GPIO - pull up resistor etc but you need to change some options in the Sonoff before compiling to tell it to use Rx as input. I don't have the info to hand but the basics were in the link.
Using GPIO 2 is the easier option. If you ensure that GPIO 0 is always high (pull up resistor to Vcc) GPIO 2 is less likely to be a problem. I would look at the 'normal' position of the float switch too though. If most of the time the switch is at maximum level, if it's a NC contact put switch between Vcc and GPIO 2 and the resistor between GPIO 2 and ground. That will keep GPIO2 high. If it's a NO contact resistor should be between Vcc and GPIO 2 and switch between GPIO2 and ground. I think you originally said it was about pumping rainwater so the 'normal' position is with the float down. In which case it's the opposite of above. That should ensure that over 90% of time you get a clean boot. You're just trying to make sure GPIO2 is high most of the time. You may need to look at your switching logic though to make sure the output does what you want.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers+unsubscribe@googlegroups.com.
It's only GPIO 0 and 2 the problem is the limited number of GPIOs which are easily available on some devices. Rx and Tx are always available which is why I suggested using Rx.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers+unsubscribe@googlegroups.com.