-->
Page 1 of 2

Interupt on GPIO16 not Working ?

PostPosted: Fri Mar 17, 2017 3:55 pm
by sandfrog
Hello,
I have an ESP-07 modules, however, the Interupt does not work on the GPIO16 and GPIO12, i use 10K Pulldowns.

GPIO14 - Works
EDIT: i use ESP Basic 3.0.Alpha 66

Code: Select all[isr]
interrupt GPIO16, [switch1]
wait

[switch1]
if io(laststat,GPIO16) = 1 then print "Hello"
goto [isr]


mfg sandfrog

Re: Interupt on GPIO16 not Working ?

PostPosted: Sat Mar 18, 2017 2:08 am
by Pablo2048
IMHO it's not a bug - according to the documentation GPIO16 doesn't have interrupt capability - RTFM @ https://github.com/esp8266/Arduino/blob ... ference.md :-)

Re: Interupt on GPIO16 not Working ?

PostPosted: Sat Mar 18, 2017 4:34 am
by sandfrog
I RTFM and ESPBASIC use Prolling for Interups

"Will execute a specific branch when a pins status changes. The interrupt polling only occurs when the esp is waiting and useful for things like push buttons trigger events. The branch must end with the wait command."


Mmiscool Writing folow:
viewtopic.php?f=42&t=13996&hilit=interupt&start=4#p63311

"You can have interupts on any of the i/o pins and there is no limit to how many you can have except the number of pins available."


But why does GPIO12 not work?

Re: Interupt on GPIO16 not Working ?

PostPosted: Sat Mar 18, 2017 6:00 am
by Pablo2048
Ok, then it's probably a bug ;-) in ESP8266Basic.ino in RunBasicTillWait() in for (int pinn = 0; pinn <= 15 - probably there should be 16. For GPIO12 check PinListOfStatus[12] value...