Chat freely about anything...

User avatar
By cal
#21724
martinayotte wrote:Just read my latest reply viewtopic.php?f=13&t=3729#p21674

Mainly, there is a distinction between following specs and rules or following others testimonies says "it works for me".
There are some basic rules and best practices known since decades, and when people doesn't follow them, that is there choice.

+1
User avatar
By Cosmic Mac
#21790
martinayotte wrote:Just read my latest reply viewtopic.php?f=13&t=3729#p21674

Mainly, there is a distinction between following specs and rules or following others testimonies says "it works for me".
There are some basic rules and best practices known since decades, and when people doesn't follow them, that is there choice.


Sorry martinayotte, but I'm not an electronic engineer, and I can't tell at first glance who is right and who is wrong .
I have to go through many sources of information to figure out and make my opinion.
And sometimes even the smartest people seem to have divergent opinions.
Anyway, when in doubt, I always choose the pragmatic way: I just test by myself. :)
So, I know this is probably not very satisfactory from an engineer's point of view, but hey! I reach my goals (sometimes...), having fun and still learning on the way.

Concerning GPIO2, if I usually let it floating, with no apparent drawback (some of my toys are up for quite a long time now), I don't pretend this is the academic way to go. Sorry if my first post was misleading.

Oh, and even if I'm not always comfortable with English, that does not prevent me to appreciate what you write. ;)
Keep posting, keep sharing, for people like me, for all those who do not have your expertise.

Cheers
User avatar
By kenn
#21794
pete_l wrote:My plan is to use an ESP-01 (the one with two GPIO pins exposed) in a simple application where one pin is used as an input and is connected to a PIR and the other GPIO is an output that activates a floodlight.
This is a pretty simple security light type of device with the obvious advantage of being web-connected.

The problem that kills this application stone dead is the ESP8266 bootloader. When power is applied, both GPIO pins are set as inputs and their state (logic 0 or 1) determines whether the ESP-01 will run user code (when both are at logic 1) or whether it enters a state for loading firmware. However, it appears that the only state that allows user code will be executed after a power-up is for both GPIO0 and GPIO2 to be at a "1". With a PIR connected to one of these input pins it's obvious that this situation cannot be guaranteed.


1) use GPIO2 as the PIR input

2) use GPIO0 as the output that controls the floodlight, but negative logic: 0 on GPIO0 = light on. Use a 5k pullup or similar on GPIO0 if your floodlight driver circuit doesn't already provide pull-up to GPIO0.

This should work fine using an ESP-01 with stock bootloader.