Hello,
I have two Arduino micro equipped with Nrf24L01 card.
I programmed an interrupt on the IRQ pin of the second which will activate the power down: Texte préformaté
attachInterrupt(digitalPinToInterrupt(0), wakeUp, LOW);
LowPower.idle(SLEEP_FOREVER, ADC_OFF, TIMER4_OFF, TIMER3_OFF, TIMER1_OFF, TIMER0_OFF, SPI_ON, USART1_OFF, TWI_OFF, USB_OFF);
detachInterrupt(0); Texte préformaté
When the interrupt is triggered, following the sending of a message from the first arduino
The arduino goes to sleep fine.
However, once it is in standby, the IRQ pin remains high. And this even if the first arduino continues to transmit (I checked with the oscilloscope).
As a result, the arduino no longer wakes up, the messages are no longer processed.
Have you ever tried a sleep mode with this pin?
Thank you in advance for your feedback
Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project See About the Installation & Troubleshooting category.
On the arduino micro I have associated the D0 pin for the interrupt.
When I do not activate the low power mode, the interruption occurs every time.
I looked on the forums, the IRQ pin and often programmed as an interrupt when received on the board. It works very well.
However, the low power mode disables the operation of the Nrf24L01 card. The IRQ signal therefore no longer goes low.
There may be an existing sleep mode allowing the Nrf24L01 card to operate normally.
I looked for it, but I couldn't find it.
attachInterrupt() expects the interrupt number, not the pin. Therefore you should use digitalPinToInterrupt() instead of a hard-coded number so it will do the translation from pin number to interrupt for you.
Isn't that what I did?
my problem comes from the Nrf24L01 card as explained above.
At the oscilloscope, there is no longer a low state on IRQ, when I am power off.
I tried a lot of things, I can't find it.
But in the RF24 library, there may be a function uqi leaves the card activated even in power down https://nrf24.github.io/RF24/examples.html