Question about GPIO pin 16

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
slzatz
Posts: 92
Joined: Mon Feb 09, 2015 1:09 am

Question about GPIO pin 16

Post by slzatz » Mon May 09, 2016 4:18 pm

The micropython esp8266 documentation states that all pins except number 16 can be configured to trigger a hard interrupt if their input changes.

Unfortunately, for the Adafruit Huzzah ESP8266 Feather and its OLED "FeatherWing", the three buttons are assigned to Pins 0, 16 and 2 respectively.

For a project, I'd like to use all three buttons and I do have external interrupts working on the buttons that correspond to pins 0 and 2 and my question is whether there is any way to do so using the button corresponding to pin 16 -- I don't understand whether there is something inherently different about pin 16 or whether that is something that is controlled by the firmware that I might be able to change. In my case, I don't need to wakeup from deepsleep mode, which I understand can be done through pin 16. My c skills are pretty limited so am asking for any pointers before starting to dig in.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Question about GPIO pin 16

Post by deshipu » Mon May 09, 2016 4:58 pm

Unfortunately, Pin 16 is inherently special. It's controlled by the RTC clock and used to wake the board up from deep sleep. The code needed to switch it is a little bit different, and the peripherals connected with it are different. This is a hardware, not a software thing.

slzatz
Posts: 92
Joined: Mon Feb 09, 2015 1:09 am

Re: Question about GPIO pin 16

Post by slzatz » Mon May 09, 2016 5:51 pm

Thanks for the explanation. Sounds like should look into detecting changes to pin 16 in a while loop even if can't set it as an external interrupt.

Post Reply