mirror of
https://github.com/nopnop2002/esp-idf-mpr121.git
synced 2025-12-17 01:44:30 +03:00
changed to component
This commit is contained in:
52
README.md
52
README.md
@@ -25,27 +25,63 @@ idf.py flash
|
||||
```
|
||||
|
||||
# Configuration
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
# Wirering
|
||||
|
||||
|MPR121||ESP32|ESP32-S2/S3|ESP32-C2/C3/C6|
|
||||
|:-:|:-:|:-:|:-:|:-:|
|
||||
|SCL|--|GPIO22|GPIO12|GPIO6|
|
||||
|SDA|--|GPIO21|GPIO11|GPIO5|
|
||||
|SCL|--|GPIO19|GPIO12|GPIO6|
|
||||
|SDA|--|GPIO18|GPIO11|GPIO5|
|
||||
|IRQ|--|GPIO15|GPIO18|GPIO4|
|
||||
|GND|--|GND|GND|GND|
|
||||
|VCC|--|3.3V|3.3V|3.3V|
|
||||
|
||||
__You can change it to any pin using menuconfig.__
|
||||
__Note:__It is recommended to add external pull-up resistors for SDA/SCL pins to make the communication more stable, though the driver will enable internal pull-up resistors.
|
||||
|
||||
__You can change it to any pin using menuconfig.__
|
||||
|
||||
# Screen Shot
|
||||

|
||||
|
||||
Supports multiple simultaneous touches.
|
||||
```
|
||||
I (55786) MAIN: electrode 0 was just touched
|
||||
I (55786) MAIN: electrode 1 was just touched
|
||||
I (55786) MAIN: electrode 2 was just touched
|
||||
I (55786) MAIN: electrode 3 was just touched
|
||||
I (58446) MAIN: electrode 0 was just released
|
||||
I (58446) MAIN: electrode 1 was just released
|
||||
I (58446) MAIN: electrode 2 was just released
|
||||
I (58446) MAIN: electrode 3 was just released
|
||||
```
|
||||
|
||||
# How to use this component in your project
|
||||
Create idf_component.yml in the same directory as main.c.
|
||||
```
|
||||
YourProject --+-- CMakeLists.txt
|
||||
+-- main --+-- main.c
|
||||
+-- CMakeLists.txt
|
||||
+-- idf_component.yml
|
||||
```
|
||||
|
||||
Contents of idf_component.yml.
|
||||
```
|
||||
dependencies:
|
||||
nopnop2002/mpr121:
|
||||
path: components/mpr121
|
||||
git: https://github.com/nopnop2002/esp-idf-mpr121.git
|
||||
```
|
||||
|
||||
When you build a projects esp-idf will automaticly fetch repository to managed_components dir and link with your code.
|
||||
```
|
||||
YourProject --+-- CMakeLists.txt
|
||||
+-- main --+-- main.c
|
||||
| +-- CMakeLists.txt
|
||||
| +-- idf_component.yml
|
||||
+-- managed_components ----- nopnop2002__mpr121
|
||||
```
|
||||
|
||||
# Reference
|
||||
https://github.com/nopnop2002/esp-idf-ttp229
|
||||
|
||||
Reference in New Issue
Block a user