i start playing with my arduino and im writing the simply code, where i measuring the AC current.
I will made the automatic protection for water pump. If water thank is empty the pump have less resistance and the current is lower. I will measuring current and if procesor will check that current is low enough, he sey stop the pump.
There i have the problem with millis() function. In may code i have two parameters which must be finished that my if statement is procesed :
If(my current > 4.2 && time is more than 4 seconds)
i dont know how properly use millis that will count me time if current is hire than 4.2 A.
thanks for all