I have an Arduino Uno and an Arduino Nano communicating successfully via XBee Series 1 radios.
A light sensor is attached to Arduino Uno, reading and uploading light intensity data to another XBee radio attached to my PC. An LED (which is modelling after a relay), is attached the Arduino Uno.
I am thinking of activating this relay wirelessly through XBee whenever a button is pressed on the Arduino Nano, and I have thought of using the attachInterrupt() function in Arduino. This is because there is a 1s delay in void loop() but I would like to have the relay activated instantaneously whenever I press a button on the Arduino Nano.
May I ask if the attachInterrupt() function will work if I were to send data wirelessly from the XBee on Arduino Nano to my Uno?
Thank you! :)