I can't get the simplest pin change interrupt code working. I'm using an Elegoo Nano V3. I'm trying to detect a pin change on D4, but seeing conflicting info online.
Does the Nano have PCIE0, PCIE1 and PCIE2?
Do I need to enable the pin as an input first?
Am I using the correct pin numbers? (Board numbers that go up to about 30 vs printed numbers like D4 vs PCINT numbers)
This code doesn't even try to differentiate which pin was changed. But absolutely nothing happens. Is Serial available from ISR. I've experimented with different combinations of pins and ports.
You're at least missing a Serial.begin(), so printing will not work. Printing should work after that. You can also simply flash the built-in LED in the ISR.
Notes:
Comments that don't match the statement are not useful (PCICR 0x04 is for port D, not port B) and confusing