Wi-Fi touch sensor
Explore with your favorite AI
Gemini & other AI
Copy this page’s context into your AI to explore how it works and what you can build.
Copy the prompt, then paste it into Gemini’s message box.
View prompt
Overview
Section titled “Overview”When shipped from the factory, Arduino sketches are written on the ESP32 MCU leaf, so the touch sensor values can be sent via Wi-Fi from a smartphone or PC, and the display will appear.
Leaf to use
Section titled “Leaf to use”Use the following leaves.
| Type | Name | Q’ty |
|---|---|---|
| AP02 | ESP32 MCU | 1 |
| AV04 | 2V~4.5V | 1 |
| AX07 | Back to back | 1 |
| AX08 | 29pin header | 1 |
| AZ62 | Connector Cover | 2 |
| AZ63 | Nut Plate | 2 |
| AAA battery holder | 1 | |
| AAA battery | 3 | |
| M2*15mm screw | 4 | |
| φ10x2mm magnet | 1 |
Assembly
Section titled “Assembly”Assemble the leaves as shown in the figure below.

Pin assignment
Section titled “Pin assignment”Refer to the figure below for the pin assignment of each leaf.
Source code
Section titled “Source code”The sketch to be used can be found in the GitHub repository below.
Leafony/Sample-Sketches/ESP32_AP_Touch - GitHub
Execution method
Section titled “Execution method”- Insert three AAA batteries into the ESP32 Wi-Fi Kit and turn on the power switch.

- Search for nearby Wi-Fi networks on your PC, smartphone or tablet, and connect to the following network.
- SSID: Leafony_ESP32-AP
- Password: password
- Launch a web browser on your PC or smartphone and go to http://192.168.4.1.
- Pins 7, 9, 22, 24, 26, and 28 of the 29-pin header are assigned to the touch sensor.
When the pin is touched, the capacitance increases and the value decreases. When the value is 20 or lower, “Touch detected” is displayed.
(Pin 24 is hidden in the sample sketch because it interferes with the RTC & microSD. The detection threshold can be changed in the sketch. In the following picture, I am touching pin 26 with my fingertip.)

- When you touch pin 26, the browser display will change as shown below.

-
The ESP32 Wi-Fi Kit has a magnet attached to its Nut Plate. Try mounting it on a metal wall or another metal surface.

