Skip to content
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

Avoid signed integer overflow in example sketch #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 15, 2022

  1. Avoid signed integer overflow in example sketch

    The `int' type is only 16-bits long in some Arduinos. On those devices,
    the square of an analog reading, filtered or not, may not fit in an
    `int'. Use `long' instead, in order to avoid signed integer overflow,
    which in C++ is undefined behavior.
    edgar-bonet committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    82c49e8 View commit details
    Browse the repository at this point in the history