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

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
lazarvgd
Posts: 29
Joined: Sun May 20, 2018 8:57 am

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

Post by lazarvgd » Mon Nov 26, 2018 9:19 am

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 :)

User avatar
Roberthh
Posts: 1718
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

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

Post by Roberthh » 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.

lazarvgd
Posts: 29
Joined: Sun May 20, 2018 8:57 am

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

Post by lazarvgd » Mon Nov 26, 2018 3:01 pm

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 :)

User avatar
Roberthh
Posts: 1718
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

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

Post by Roberthh » Mon Nov 26, 2018 3:13 pm

I assuem that I can turn on pullup resistor and use the pin in inverted mode?
Yes.

lazarvgd
Posts: 29
Joined: Sun May 20, 2018 8:57 am

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

Post by lazarvgd » Mon Nov 26, 2018 3:15 pm

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 :)

Post Reply