Waking Arduino Uno Wifi R2 From Sleep Upon Receiving UDP Packet

Hello,

Currently, I'm working on a motorized register project. In this case, a raspberry pi Zero W is the master of an Arduino Uno Wifi Rev2 which communicate wirelessly over UDP transmission. I have the raspberry Pi sending the arduino commands to open/close the register using a servo motor.

Here's my question: In order to save battery on the arduino uno (in the case of using a battery pack for power) I would like to put it into sleep mode until a wireless UDP packet is received from the raspberry Pi. Is something like this even possible? If so does anyone have any references or code for me to go off of?

Attached is my Arduino Uno sketch in order to get a feel for how the system works.

I appreciate any advice or help in advance.

Thank you,
Jaxon

motorizedVentSketch.ino (3.74 KB)

If You attache code using code tags, the symbol up to the left in this window, More helpers will be Reading You code. Some of them use smartphones or tablets and can't download .ino files. Some don't want to fill up their harddiscs with OPs code…

References, yes. Code, not likely.

harrison5419:
In order to save battery on the arduino uno (in the case of using a battery pack for power) I would like to put it into sleep mode until a wireless UDP packet is received from the raspberry Pi.

So if the WiFi receiver is asleep (as in off or not working) how would it receive anything ?

Receivers are typically more power hungry than Arduinos, and if the message could arrive at any time, the receiver has to be on all the time.

Not a project for battery power, unless you can arrange for solar charging.