Modify existing XBEE arduino code replacing button instance with gesture sensor inputs

Job ID: 32264472

Budget: $30 – $250 USD

I have existing arduino code (see attached) where a universal master sends data starting a LED sequence/signal to multiple slaves in a mesh network using XBEE 2.4Ghz S1 modules. I want to replace the "button push" instance with a gesture sensor instance, where any gesture = "LEFT" or gesture = "RIGHT" will replace the function of the "button push" that's currently in my code. Gesture ( LEFT & RIGHT) will initiate sending the data instead of the button. I do not want to use UP/DOWN only LEFT/RIGHT for now.

Arduino model = nano v3
Gesture sensor = Gowoops APDS-9960 Hand Gesture Sensor 3.3v
XBEE = 2.4Ghz XBEE S1

Please provide the following:
- validated code (I can also test with my units)
- new schematic

I am somewhat technical (HW) but just learning to code

Thanks,
Chris