Skip to content

Conversation

@willwillems
Copy link

Added an additional function that might come in handy for people that are getting unstable potentiometer values (apparently a real problem if you are using manual wiring instead of PCB's).

The read_n function only sends out a new value if it deviates a certain amount of the previous value. The comparison is done before converting the 0-1023 reading to 0-127 causing no loss of resolution.

Adds a relative noise cancelling reading method to the library which is more stable if used with lower quality potentiometers
user is now able to provide an custom deviation
@willwillems
Copy link
Author

I made a little mistake in the provided code, have updated it and it compiles now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants