ArduinoLowPower icon indicating copy to clipboard operation
ArduinoLowPower copied to clipboard

Serial not working after attachAdcInterrupt

Open OriolFalip opened this issue 3 years ago • 1 comments

I'm using a MKR WAN 1310 with the following code:

Serial.print("Battery voltage: ");
Serial.println(analogRead(BATTERY_ANALOG_PIN));
LowPower.attachAdcInterrupt(BATTERY_ANALOG_PIN, lowBatteryVoltage, ADC_INT_BETWEEN, minLowBattery, maxLowBattery);
Serial.println("Can you see me?");

I can see in my console that the battery voltage is printed but any other Serial.print() after attachAdcInterrupt() doesn't print anything.

Is it supposed to be like this? That when you attach the interrupt, Serial no longer works? Is there any other functions that may not work?

OriolFalip avatar Jun 02 '22 11:06 OriolFalip

Just for clarity, which core version and which version of the libraries are you using? Can you provide a complete (minimal) sketch?

aentinger avatar Jun 07 '22 04:06 aentinger