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

Feat add support for other two pots #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SpyrosCpt
Copy link

Context:
I noticed that when using this library I could only control 2/4 Potentiometers.
I have added support for the other two.

Important mentions:

  1. All bools have now been replaced with uint8_t's
  2. I have added an extra function to access TCON1
  3. Some code was cleaned up
  4. There was a mismatch in type for DigitalPotSetWiperPosition, this caused code not to compile on Platformio I have made it a uint16_t

@kulbhushanchand
Copy link
Owner

Thank you for the proposed features.

The proposed features are suitable for a 4 channel potentiometer. This library is for MCP4251 which is a 2 channel potentiometer. If the proposed features are to be merged, then the name of the library needed to be changed to generic term like MCP4X51. Changing name of the library to incorporate new features after publishing may not be a good idea.

Better idea would be to create a new library with generic terminology (MCP4XXX) or for the specific 4 channel pot (e.g. MCP4451) which will cover all the use cases for potentiometer 1 to 4.

Also, one of the commit is directly relevant to issue at #2 (comment) which is still pending due to my other commitments.

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