Description
ESP-12 / pin 12 grounded with switch.
IDE 1.6.1-esp8266-1 / mac osx --> Working --> ANYEDGE
IDE 1.6.5 / mac osx( 775e9d4..49c25b9 esp8266 -> origin/esp8266) ---> NOT --> POSEDGE
int pin1 = 14;
volatile int state = LOW;
void setup()
{
Serial.begin(38400);
pinMode(pin1, OUTPUT);
pinMode(12, INPUT_PULLUP);
attachInterrupt(12, blink, CHANGE);
}
void loop()
{
digitalWrite(pin1, state);
//
Serial.print("state: ");
Serial.print(state);
Serial.print("\tread : ");
Serial.println(digitalRead(12));
delay(500);
}
void blink()
{
state = !state;
}
result
IDE 1.6.1-esp8266-1 / mac osx --> Working
IDE 1.6.5 / mac osx( 775e9d4..49c25b9 esp8266 -> origin/esp8266) ---> NOT
1.6.1-esp8266-1
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 1 read : 0 --> change
state: 1 read : 0
state: 1 read : 0
state: 1 read : 0
state: 1 read : 0
state: 0 read : 1 --> change
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 1 read : 0 --> change
state: 1 read : 0
state: 1 read : 0
state: 1 read : 0
state: 1 read : 0
state: 0 read : 1 --> change
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
775e9d4..49c25b9 esp8266 -> origin/esp8266
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 0 read : 0 --> should be changed
state: 0 read : 0
state: 0 read : 0
state: 0 read : 0
state: 0 read : 0
state: 0 read : 0
state: 1 read : 1
state: 1 read : 1
state: 1 read : 1
state: 1 read : 0 --> should be changed
state: 1 read : 0
state: 1 read : 0
state: 1 read : 0
state: 1 read : 0
state: 1 read : 0
state: 1 read : 0
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1
state: 0 read : 0 --> should be changed
state: 0 read : 0
state: 0 read : 0
state: 0 read : 0
state: 0 read : 0
state: 0 read : 0
state: 0 read : 0
state: 0 read : 0
state: 1 read : 1
state: 1 read : 1
state: 1 read : 1
state: 1 read : 1
state: 1 read : 1
state: 1 read : 0
state: 1 read : 0
state: 1 read : 0
state: 1 read : 0
state: 0 read : 1
state: 0 read : 1
state: 0 read : 1