|
If you do the research like I did, then you would see that a loop is 26.2 ms a loop. If your code is shorter then you wait at serin until you get the information and start the loop over. If you take too long in your code, then the delta_t comes in. It count the number of loops you missed as long as it is in the serin. If you miss 5 serins then you have the basic run error. So in theory, this should be accurate.
__________________
2017 - Team 2832 Mentor
2016 - Team 6013 Mentor
2002-05 - Team 45 Software/Electrical
A robot is like a campfire: it takes a while to bulid it, and then everyone surounds it!
A world without standards is chaos. A world with standards is chaos.
|