https://github.com/dawinaj/mcp3x0x
MCP3x0x driver for ESP32
https://github.com/dawinaj/mcp3x0x
adc analog-to-digital-converter cpp driver esp32 hal mcp3002 mcp3004 mcp3008 mcp3202 mcp3204 mcp3208 mcp3304 mcp3308 voltage
Last synced: 2 months ago
JSON representation
MCP3x0x driver for ESP32
- Host: GitHub
- URL: https://github.com/dawinaj/mcp3x0x
- Owner: dawinaj
- License: mit
- Created: 2023-04-19T18:27:33.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-15T00:00:40.000Z (7 months ago)
- Last Synced: 2024-12-28T19:33:15.605Z (4 months ago)
- Topics: adc, analog-to-digital-converter, cpp, driver, esp32, hal, mcp3002, mcp3004, mcp3008, mcp3202, mcp3204, mcp3208, mcp3304, mcp3308, voltage
- Language: C++
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESP32 MCP3x0x ADC driver/library
This is a single-file header-only C++ style library (see files in `main/include/`) for driving the popular **MCP3xxx** family of MicroChip's analog-digital converters from an **ESP32** microcontroller.
Currently supported are:
- MCP3002, MCP3004, MCP3008
- MCP3202, MCP3204, MCP3208
- MCP3304, MCP3308
- other versions?It is based on three other libraries:
- https://github.com/bakercp/MCP3XXX
- https://github.com/nopnop2002/esp-idf-mcp3002
- https://github.com/gfurtadoalmeida/esp32-driver-mcp320x## Installation & usage
See example in `main/main.cpp`.- Move the files from `main/include/` to your include directory.
- Add `driver` to your `idf_component_register` `REQUIRES`.
- #include the `MCP3x0x.h` in your code.
- Create a custom class or use one of the predefined ones.
- Create its object.
- Done!