With Instructables you can share what you make with the world, and tap into an ever-growing community of creative experts.
Tell us about yourself!
I recommend looking at the factory supplied arduino software code, and initialising the "lastTime" parameter to zero. Also, note that the the "SampleTime" parameter apparently has units of seconds, while the "timeChange" parameter has units of milliseconds. But yet, there is a line in the code that "magically" compares these two parameters (which have different units). Appears to be a mistake. It's the line that says:if(timeChange >= SampleTime)Also, note that the parameter "dt" has units of milliseconds as well.
Let your inbox help you discover our best projects, classes, and contests. Instructables will help you learn how to make anything!
© 2016 Autodesk, Inc.