probonopd / PoorMakers_IR_Receiver

Poor Maker's Infrared receiver
13 stars 2 forks source link

NodeMCU? #3

Open bbrendon opened 7 years ago

bbrendon commented 7 years ago

How would this work on a NodeMCU? I don't see where in the sketch to change the pin number. The comments mention pin 2, but there isn't code that sets pin 2.

probonopd commented 7 years ago

This code is for AVR based devices. There are only two external interrupt pins on the ATmega168/328 (ie, in the Arduino Uno/Nano), INT0 and INT1, and they are mapped to Arduino pins 2 and 3. https://www.arduino.cc/en/Reference/AttachInterrupt

I don't know whether this code would even run on ESP8266 based devices. There you can set the pin with attachInterrupt(GPIO_PIN,....