200227.5 // The Lag

Hardware

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.

circuit diagram

 

Software

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.