hello, hope you doing all well, i was trying to trigger an interruption from a nano rp 2040 connect on arduino nano, i linked them with one wire, set the pin for interruption, and this is the code i used :
volatile bool pinState = LOW;
void setup() {
Serial.begin(9600);
// Set up the interrupt pin as input
pinMode(10, INPUT);
// Attach interrupt to the interrupt pin, triggering on any change (RISING or FALLING)
attachInterrupt(digitalPinToInterrupt(10), handleInterrupt, CHANGE);
}
void loop() {
// put your main code here, to run repeatedly:
delay(100);
}
void handleInterrupt() {
// This function is called when the interrupt pin changes state
pinState = digitalRead(10); // Read the current state of the pin
if (pinState == HIGH) {
Serial.println("Interrupt detected: Pin is HIGH");
} else {
Serial.println("Interrupt detected: Pin is LOW");
}
}
i did use a level shifter ( since rp2040 operates on 3.3 V and uno on 5 v logic) , i tested with an oscilloscope and checked that the wire sending interruption signal to arduino uno had indeed 5 V, so i can t figure out why the interruption isn't happening.
sorry, that was the code on arduino uno ( once the rp 2040 connect set the pin to high, it should trigger the interruption) , i added a print of the digital state of the pin in uno and it s effectively changing, so the problem is why the interruption not triggered.