I would like to use today's blog post to TTP229-Module present and show how to read these 16-keys. How a microcontroller can capture Capacitive inputs this contributionthe ESP32; and here at the UN Showed.
The TTP229 module basically supports two notable operating modes, the multi-key input and the 16-button mode. Communication via a serial interface is supported by this Libary with only two connections possible.
For our application example we need:
- Installation of the Libary
- soldering of the stylists
We start with soldering the pen bars, these are not included in the delivery:
Once the tabs are soldered, we can install the libary. We download these from GitHub as usual and unpack the files to USERNAME/Documents/Arduino/libarys.
After the mandatory restart of the Arduino IDE we have two examples: KeytoSerial and Calculator.
Plug in the Jumper Bridge as shown in the following image to activate the 16-button mode:
This mode is intended for the example KeyToSerial. After the successful upload of the sketch we can read the pressed keys from the serial monitor:
All 16-keys are correctly captured.
The next step is to test the multi-button mode. the Jumper to see as in the next picture:
Only the first eight keys of the keypad are supported in this mode. The supplied sketch "Calculator" adds the values of the simultaneously executed keys.
When pressing key 4, it appears in the serial monitor:
and both simultaneously:
This brings us to the end of today's article, having a lot of fun experimenting and testing with the touch module:)
Until next time:)