Skip to content

Feat add support for other two pots#3

Open
SpyrosCpt wants to merge 3 commits into
kulbhushanchand:masterfrom
SpyrosCpt:feat-add_other_two_pots
Open

Feat add support for other two pots#3
SpyrosCpt wants to merge 3 commits into
kulbhushanchand:masterfrom
SpyrosCpt:feat-add_other_two_pots

Conversation

@SpyrosCpt

Copy link
Copy Markdown

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
Copy Markdown
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