Pinguino Forum
attachInterrupt(digitalPinToInterrupt(pin), ISR, mode); - Printable Version

+- Pinguino Forum (http://forum.pinguino.cc)
+-- Forum: Software (http://forum.pinguino.cc/forumdisplay.php?fid=7)
+--- Forum: Syntax & Programs (http://forum.pinguino.cc/forumdisplay.php?fid=19)
+--- Thread: attachInterrupt(digitalPinToInterrupt(pin), ISR, mode); (/showthread.php?tid=4807)



attachInterrupt(digitalPinToInterrupt(pin), ISR, mode); - jwzumwalt - 01-03-2016

The format for using attachInterrupt() is shown at

https://www.arduino.cc/en/Reference/AttachInterrupt

a simple example is shown

Code:
int pin = 13;
volatile int state = LOW;

void blink() {
   state = !state;
}

void setup() {
   pinMode(pin, OUTPUT);
   attachInterrupt(pin, blink, CHANGE);
}

void loop() {
   digitalWrite(pin, state);
}

I can't get this to work. Does anyone have a successful use of attachInterrupt()?

attachInterrupt() appears to not work in Pinguino, has anyone else confirmed this?