Occlusion & Air Bubble detection

We are beginners at Arduino & we are making a project to detect Occlusion & Air Bubbles in the Nutritious (Using buzzer for alarming) , we already started writing the code for the project but we have a lot of hardness in using it right specially millis() the alarm is going on when we contact the hardware with the Nutritious & Arduino before the liquid or the generated air bubbles even passed then after making some changes in the code the alarm stopped but all other codes been ignored by Arduino.

Can you please helping us with a code for air bubble & occlusion detection ?

Not with the available information... Perhaps a concrete sketch with explanation of what is
supposed to do, and what it actually does wrong? You were asked to provide sufficient
information in the sticky thread, perhaps save us time and go read it (again?). "Read
this before posting" means "Read this and follow the guidance when you post".