Skip to content

Latest commit

 

History

History
34 lines (18 loc) · 1.14 KB

README.md

File metadata and controls

34 lines (18 loc) · 1.14 KB

MCP40xx_Digital_Potentiometer

Arduino/Teensy library for Microchip MCP4011/12/13/14 64 taps digital potentiometer

Library usage:

  1. Instantiate a new object as:

    MCP40xx digipot(CS Pin, UD Pin)

    1.1 An overloaded constructor is available. It makes possible to debug the code via a third element:

    MCP40xx digipot(CS Pin, UD Pin, true/false)

  2. Setup and begin the digital pot:

    digipot.setup() --> assigns and initialises the digital pins digipot.begin() --> sets the initial position of the wiper

    #TODO: set three possible states: minimum wiper (done!), 50% wiper or max wiper(done!)

  3. Increase/decrease the pot's value using the inc()/dec() methods.

  4. Methods for retrieving the approximate resistance value, tap position and increment/decrement times (in microseconds) are included.

Please read both .h and .cpp files as they are self-explanatory.

If you have any suggestions/pull requests please feel free to join me on the development.

Let's work together 😃

Happy tinkering 🍺

dzalf