Product Introduction
#
The 4×4 touch keyboard module is an input device used to input data into a computer or other electronic device. Each key of this keyboard is a capacitive touch design, with a layout of four rows and four columns, and each key represents a specific character. When a finger touches a key, it causes a corresponding change in the capacitance of the touch key. Once the detection circuit connected to the key detects this capacitance change, it outputs information that the corresponding key has been pressed.
Application reference: password doors, calculators, ATM machines, mobile phones, etc.
Parameter Specification #
Parameters | Value/Description |
Operating voltage | 3.3V~5V |
Operating temperature | -40°C~+85°C |
Communication method | I2C |
Size | 5.6cm*7.8cm |
Wiring Diagram #
Note: Expansion board is attached to esp32 controller board.
4×4Touch Keyboard | ESP32 |
SCL | SCL |
SDA | SDA |
VCC | 5V |
GND | GND |
Sample Code #
#include
ACB_KeyBoard_I2C kb;//Create a touch keyboard object
void setup() {
Serial.begin(115200);
}
void loop() {
char customKey = kb.getKey();//Get the value of a key
if(customKey){//Determine if a button is pressed
Serial.print(customKey);
delay(500);
}
}
Note: If you are using an Arduino board, then connect the SCL pin of the 4×4Touch Keyboard to the PIN A5 of the Arduino and the SDA pin to the PIN A4 of the Arduino, set the baud rate to 9600, and upload the program.
Test Result #
After you have successfully connected the circuit according to the wiring diagram and successfully uploaded the correct program, when you touch and press a key, the serial port monitor will print the corresponding key value.
Related Resources #
Get One Now #
B2B Business: info@acebott.com