The green pointer indicates the area that is closest and draws the raw depth data from the kinect. We created 3 distance ranges using that information.
The camera however, has a AoE and is unable to detect objects that are <= 51cm.
We tried connecting all 8 solenoids to the arduino board through 2 relays.
Each relay is to be powered by 1 adapter. Using 1 adapter for 2 relays will cause the relays to be switch on and off in turns instead of simultaneously.
The current code uses a random delay inside each loop zone. The program reads the code line by line, and stops the entire reading process when there is a delay. Every loop has to be completed before the program is able to read the distance information from the kinect to determine which zone to activate. The lag is induced as there is no way to constantly read the distance data and jump out without completing a full cycle of the zone loop.