Skip to content

ESP8285 gpio 9 & gpio 10 interrupt #3549

Closed
@twanek

Description

@twanek

Hardware

Hardware: ESP8285 (sonoff 4ch v2.0)
Core Version: 2.3.0 - 2.4.0
Arduino IDE: 1.8.4

Settings in IDE

Module: Generic ESP8285 Module
Flash Size: 1MB
CPU Frequency: 80Mhz
Upload Using: SERIAL

Sketch

void setup()
{
      attachInterrupt(digitalPinToInterrupt( 0), button1ISR, FALLING);  // button 1
      attachInterrupt(digitalPinToInterrupt( 9), button2ISR, FALLING);  // button 2
      attachInterrupt(digitalPinToInterrupt(10), button3ISR, FALLING);  // button 3
      attachInterrupt(digitalPinToInterrupt(14), button4ISR, FALLING);  // button 4
}

Problem description

hello!

i have a sonoff 4ch, pcb v2.0 board (ESP8285). i have replaced the stock firmware with custom, using the arduino ide.

i would like to set up interrupts for each button gpio. with the above setup, button 1 and button 4 works perfectly, however, button 2 and button 3 does not work. it seems that the interrupt is never executed, although i've checked with my multimeter that gpio9 and gpio10 are high, and is going low when i press the respective button.

what could be the reason for this? unfortunately i can not find a good pinout diagram for this esp8285, all the sites i've read says that all pins have interrupt function, except gpio16.

or something is not fully implemented in the arduino core, regarding digitalPinToInterrupt() function?
but than why works the same function for gpio0 and gpio14? i'm a bit confused regarding this.

thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting for feedbackWaiting on additional info. If it's not received, the issue may be closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions