Due to the small dimensions of the microchannel, any small flows or pressure change would cause a major disturbance to the gradient, thus the initial state of the system would be unknown. To address these issues, we designed two functions in the device: 1) we used a valve on the tubing of the attractant inlet, thus avoiding any passive flow in and out of the sensing channel (channel 5 in Figure ); 2) we have a third channel (part 3, 4 and the outlet in Figure ) between the zoospore inlet and attractant inlet for creating a controlled and repeatable initial state. Essentially, a syringe pump was used to suck from the outlet after loading water and attractants to the zoospore inlet and attractant inlet, respectively, with the valve on the attractant side open. Due to the different viscosity of the liquid, a phase separation was created at the outlet (Figure ), which provided us with a known and repeatable initial statue. Then the pumping was slowly stopped, and the attractant inlet clamped shut. The two phases mixed with each other and formed a gradient of glucose that, based on the simulation, stabilised within 30 min.