The two variables get assigned the output from millis() since we have these lines:
timeLoopDelay = millis();
and
timeSerialDelay = millis();
millis() returns the number of milliseconds since the microcontroller has been powered on.
We update the values inside timeLoopDelay and timeSerialDelay so that we can check (using an IF statement) if the amount of time in the serialPeriod or loopPeriod has passed. If that amount of time has passed, then we want the program to branch inside the IF statement with that conditional statement.
The purpose is to control how often the code inside loop() is executed and how often the stuff inside debugOutput() is being executed.




Find content
Male

