# MCP41XXX / MCP42XXX A lightweight, efficient C driver for the **Microchip MCP41XXX and MCP42XXX** digital Potentiometers. This component is designed for the ESP32 series using the ESP-IDF SPI master driver. ## Table of Contents - [Features](#features) - [Installation](#installation) - [License](#license) ## Features - Supports all variants: MCP4X010 (10k), MCP4X050 (50k), MCP4X100 (100k). - Resistance API: Set resistance value directly in ohms without manual bit calculation. - Shutdown Mode: Easy use of the provided shutdow mode, to save power ## Installation ### Manual Integration Copy the source files (`mcp41xxx_mcp42xxx.c`, `mcp41xxx_mcp42xxx.h`, `CMakeLists.txt`) into your project's components or main directory. Ensure the header file is accessible within your include path ### ESP-IDF Component Manager `idf.py add-dependency "bammer187/mcp41xxx_mcp42xxx^1.0.0"` ### Add as submodule `git submodule add https://github.com/Bammer187/MCP41XXX_MCP42XXX.git components/mcp41xxx_mcp42xxx` Don't forget to update your `CMakeLists.txt`! ## License [MIT License](LICENSE)
683b446cb86100ba46c035d61baba8f0cb4cd7d5
idf.py add-dependency "bammer187/mcp41xxx-mcp42xxx^1.0.0"