For my project I am trying to get an Arduino Uno to take the temperature (with a DS18B20 sensor) every hour (using an external interrupt with a DS3231) and then send that data to a Lora gateway. I didn't write the code to send the data to the gateway yet, but when I was testing the external interrupt with the Dragino Lora Shield attached to the Arduino, it wouldn't work. I have the DS3231 SQW pin connected to pin 3 on the Dragino shield because pin 2 is used for the Lora chip DIO0. When I test the code without the Dragino shield, it works perfectly? Does anyone know why the shield messes up the external interrupt? Thank you!
As we haven't seen the code you mentioned we cannot help. Given the online available schematics are correct, the shield shouldn't influence pin D3.
Thanks for the response! I looked at my code one more time, and it turns out replacing "attachInterrupt(0,wakeUp, LOW);" with " attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), wakeUp, FALLING);" did the trick.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.