Report Bugs Here

Moderator: Mmiscool

User avatar
By cicciocb
#46467 I think you should owe me a beer :D
As a general rule, it's always best put external pullup or pulldown resistors.
The internal ones are so weak that don't warranty any immunity against spikes or noise in general.

Maybe Mike can add an option to enable pullup on input pins but what about people that wants pulldown ? :lol:
User avatar
By Electroguard
#46473 The point I was trying to make about the interrupts is that there's no mention of optional parameters for assigning trigger on HI or LO or CHANGEofSTATE, so presumably it triggers on LO same as non-autorun button, so why would you ever need interrupt to be pulldown or floating?

And granted that external pullups are advisable for external buttons on long wires, but there's a lot of dev modules available with onboard gpio00 flashing button or tomb-stone jumper link, for which the weak internal pullup is ideal... and much more convenient than being unnecessarely forced into adding flying wires and external resistor just to make the onboard button work in ESP_Basic even though it already works perfect for re-flashing and stopping auto-runs !

Hey, I'm only trying to point out what I think could be an improvable inconsistency to avoid others the sort of potential problem that's been bugging me for ages, cos I don't mind telling you I've felt pretty much alone and flogging a dead horse for ages... with what for me has been a major problem preventing me moving forward with anything useful. The only way I've been able to be sure I'm using bug-free interrupt code that works is by trying things on different hardware until I could get something to work, and then finding that it works for the nodeMCU flashing button but not on its gpio00 pin.
Having discovered the cause of the problem for myself, I feel a duty to point it out - cos if someone had done that before me it could have saved me over a week and been most welcome.

But I only point out such things and try to make helpful suggestions, it's for others to decide if anything said has any merit or not. So no probs cicciocb, PM me your address and a 'beer' will be on it's way toot sweet!

Robin
User avatar
By cicciocb
#46480 Look at this page giving some info about the pins.

wiki/doku.php?id=esp8266_gpio_pin_allocations.

As you can see in the table MODE, the pins 15, 0 and 2 are "special".

In fact the interrupt is generated on change so each time it goes from 1 to 0 and from 0 to 1.

Probably, because the pin 0 is a "special one" , I think that people simply avoid to use it.
Imagine that, is your input signal is at 0 when the unit is powered, the module will never boot.

It will not be hard to define all the pins as pullup from the startup or even add an option to enable it.

I added an option permitting to stop the autorun taking the pin 0 at gnd on startup. To make it works, I enabled the pullup but its state is reset to input only when the pi command or interrupt is run.