I am implementing a PID controller on the Arduino, I transformed my transfer function from the S domain to the Z domain and I require the sample time in seconds. This is how long it takes to get a sample from a position sensor.
This is my question:
I measured the execution time of the entire function with the millis() command. The is the time of the function execution 349uS. which is roughly 2865 samples per second. But the actual command overhead of AnalogRead() is 100uS so would my "true" sample time be 449us?