Page 1 of 1

Is it possible to use Flash button on esp board as input?

Posted: Mon Nov 26, 2018 9:19 am
by lazarvgd
Hi there,

Recently I found that I need some kind of toggle on esp8266 to turn on device, I have added pulldown resistor and it worked, but I am wondering is it possible to use onboard flash button as input? If yes, can somebody point me how to configure it?

Thanks :)

Re: Is it possible to use Flash button on esp board as input?

Posted: Mon Nov 26, 2018 10:04 am
by Roberthh
You have to show the module, since not all boards have that button. But if it is the button to enable boot mode: that one is connected to GPIO0 and it can be used with the machine.Pin() class. Doing that, you might have to deal with debouncing. But a search for that word in the forum will retrieve the needed information.

Re: Is it possible to use Flash button on esp board as input?

Posted: Mon Nov 26, 2018 3:01 pm
by lazarvgd
Roberthh wrote:
Mon Nov 26, 2018 10:04 am
You have to show the module, since not all boards have that button. But if it is the button to enable boot mode: that one is connected to GPIO0 and it can be used with the machine.Pin() class. Doing that, you might have to deal with debouncing. But a search for that word in the forum will retrieve the needed information.
It LoLin board like this:

Code: Select all

https://escapequotes.net/wp-content/uploads/2016/01/lolin-esp-nodemcu-board.jpg
I assuem that I can turn on pullup resistor and use the pin in inverted mode?

Thanks :)

Re: Is it possible to use Flash button on esp board as input?

Posted: Mon Nov 26, 2018 3:13 pm
by Roberthh
I assuem that I can turn on pullup resistor and use the pin in inverted mode?
Yes.

Re: Is it possible to use Flash button on esp board as input?

Posted: Mon Nov 26, 2018 3:15 pm
by lazarvgd
Roberthh wrote:
Mon Nov 26, 2018 3:13 pm
I assuem that I can turn on pullup resistor and use the pin in inverted mode?
Yes.
Thank you very much :)