I have an Artemis ATP and I’m experiencing a really confusing. Here’s the simplest test case I’ve been able to write to reproduce the issue. For context, I’m testing this with no wires connected to the pins.
void setup() {
Serial.begin(9600);
pinMode(D4, INPUT_PULLUP);
// attachInterrupt(D4, [](){}, FALLING);
}
void loop() {
Serial.println(digitalRead(D4));
delay(100);
}
The above code pulls D4 to HIGH and produces the following output, as expected:
1
1
1
1
1
...
If I uncomment the attachInterrupt line, then I get output that looks like this:
1
0
0
1
0
1
1
0
...
It looks like the pin begins floating. Again, this is all with no wires connected to any pins. Is there some consideration I’m not aware that I need to be making in this very simple example?
Additionally, if I put a Serial.writeln() call in the interrupt, I find that it’s being called constantly, again with no wires attached.