How to Use the NRF24L01’s IRQ Pin to Generate an Interrupt With Arduino
Intro: How to Use the NRF24L01’s IRQ Pin to Generate an Interrupt With Arduino
In this instructable we look at how to use the pulse signal from an nRF24L01+ transceiver module's IRQ pin to trigger an interrupt in Arduino. You can find the code from the video on my blog: http://forcetronic.blogspot.com/2016/07/using-nrf24l01s-irq-pin-to-generate.html
3 Comments
kintara58. 5 years ago
while(wirelessSPI.available()) { //get data sent from transmit
wirelessSPI.read( &gotByte, 1 ); //read one byte of data and store it in gotByte variable . This will reset the IRQ signal so other IRQs can be sent.
As the gotByte value was never used I assumed those two lines could be omitted - but they cannot. Without them the NRF24 would hold the IRQ pin LOW and so could not issue another IRQ.
KIntara
JayendranR 3 years ago
You could simply call whatHappened(tx_ok, tx_fail, rx_ready) on the object, passing three bool variables. The call clears the interrupt and you can selectively take an action based on the boolean flags.
Cheers,
Jay
TorstenL 4 years ago