analogRead() triggers unrelated interrupt

When using analogRead() and interrupts on on GPIO inputs with internal pullup e.g. pinMode(BUTTON_1, INPUT_PULLUP) unexpected interrupts can happen when analogRead() is called.

Workaround

Use internal pulldown to avoid the problem e.g. pinMode(BUTTON_1, INPUT_PULLDOWN);

Loading...
Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Leave a Reply

Your email address will not be published. Required fields are marked *

Free Link Directory