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.
Join 2 million + to receive instant DIY inspiration in your inbox.
© 2016 Autodesk, Inc.