Introduction: ESP32 Codelock With Touchscreen
A lot of people asked me for a very simple code example for ArduiTouch to test their work and also as starting point for own developments. This very simple codelock will demonstrate the basic functions of Arduitouch without any bells and whistles and can be extended with additional features of your choice...
Step 1: Tools & Materials
Step 2: Assembly of Arduitouch
Please follow the attached assembly instruction for the assembly of the ArduiTouch kit.
Step 3: Installation of Additional Libraries
Install the following libraries through Arduino Library Manager
- Adafruit GFX Library https://github.com/adafruit/Adafruit-GFX-Library/...
- Adafruit ILI9341 Library https://github.com/adafruit/Adafruit_ILI9341
- XPT2046_Touchscreen by Paul Stoffregen https://github.com/adafruit/Adafruit_ILI9341
You can also download the library also directly as ZIP file and uncompress the folder under yourarduinosketchfolder/libraries/
After installing the Adafruit libraries, restart the Arduino IDE.
Step 4: Source Code
You will find the latest version of the source code on Github
- ESP32 https://github.com/HWHardsoft/ArduiTouch-Codelock...
- ESP8266 https://github.com/HWHardsoft/ArduiTouch-Codelock...
In the source code you can set the code number :
#define codenum 42
(of course 42 is the answer for everything, but you can change this to any number between 0 and 999999.)
Step 5: Run the Demo
Please open this sample in the Arduino IDE. After compilation and upload you will see the keypad. Now you can enter a code number and confirm with „OK“ button.