You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to attach a pin change interrupt to pin D2 of an Arduino Nano.
From reading the code I think I need a function called PCINT0, and need to call avr_device::interrupt::enable(); and from reading the data sheet for the ATmega328P I believe I need to set bit 0 of the PCICR to 1 and bit 2 of PCMSK2 to 1 however I can't figure out how to control those registers.
I am trying to attach a pin change interrupt to pin D2 of an Arduino Nano.
From reading the code I think I need a function called
PCINT0
, and need to callavr_device::interrupt::enable();
and from reading the data sheet for the ATmega328P I believe I need to set bit 0 of the PCICR to 1 and bit 2 of PCMSK2 to 1 however I can't figure out how to control those registers.My interrupt function is below
The text was updated successfully, but these errors were encountered: