-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Error in IDE code example: 'Debounce' #5311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Which IDE version are you using? |
V1.6.9 |
As requested in #5311 to avoid overflow issues.
Thank you! |
Thank you very much for fixing this. It's very much appreciated. Keep up the good work, |
In the 'Debounce' example provided with the IDE, under "File >Examples >Digital", the value of 'millis()' is stored in a 'long' variable type, which is not large enough:-
It should be stored in an 'unsigned long'.
As a result of this error, many new users have picked up the same bad habit.
Is it possible to have that example modified, and 'long' replaced by 'unsigned long'?
This would save many new users from potential hard-to-detect problems if their code runs for long periods.
Thanks,
... Steve
The text was updated successfully, but these errors were encountered: