AttachInterrupt on NodeMCU
Posted: Wed Jan 18, 2017 4:54 am
I'm trying to figure out how the AttachedInterrupt works on the NodeMCU.
Everything I found tells me that this code is OK?!
But I just get this error:
I still have no idea after hours of research!
Thanks a lot in advance
Everything I found tells me that this code is OK?!
Code: Select all
void setup() {
Serial.begin(9600);
pinMode(D4, INPUT);
attachInterrupt(D4, doSth(), CHANGE);
}
void loop() {
Serial.println(digitalRead(D4));
delay(100);
}
void doSth() {
Serial.println("Check!");
}
But I just get this error:
I still have no idea after hours of research!
Thanks a lot in advance