You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/02.hero/boards/uno-r4-wifi/tutorials/touch/content.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
-
title: Uno R4 Capacitive-Touch Tutorial.
2
+
title: UNO R4 Capacitive-Touch Tutorial.
3
3
difficulty: beginner
4
-
description: Learn to use the built-in capacitive sensing capabilities of the Arduino® Uno R4.
5
-
tags: [Arduino, Capacitive Sensing, Uno R4]
4
+
description: Learn to use the built-in capacitive sensing capabilities of the Arduino® UNO R4.
5
+
tags: [Arduino, Capacitive Sensing, UNO R4]
6
6
author: Pedro Lima
7
7
hardware:
8
8
- hardware/02.hero/boards/uno-r4-wifi
@@ -12,7 +12,7 @@ hardware:
12
12
- web-editor
13
13
---
14
14
15
-
Capacitive sensing is a technology that detects changes in capacitance to determine the presence or absence of a conductive object, such as a human finger. This principle is widely used in touch-sensitive devices. The Arduino® Uno R4, both the [WiFi](https://store.arduino.cc/products/arduino-uno-r4-wifi) and [Minima](https://store.arduino.cc/products/arduino-uno-r4-minima) versions, come equipped with built-in capacitive sensing capabilities, making it easier to integrate touch inputs into your projects.
15
+
Capacitive sensing is a technology that detects changes in capacitance to determine the presence or absence of a conductive object, such as a human finger. This principle is widely used in touch-sensitive devices. The Arduino® UNO R4, both the [WiFi®](https://store.arduino.cc/products/arduino-uno-r4-wifi) and [Minima](https://store.arduino.cc/products/arduino-uno-r4-minima) versions, come equipped with built-in capacitive sensing capabilities, making it easier to integrate touch inputs into your projects.
16
16
17
17

18
18
@@ -21,18 +21,18 @@ Capacitive sensing is a technology that detects changes in capacitance to determ
21
21
Imagine the sensor as creating an invisible electric field around itself. When a conductive object (like your finger) approaches, it's like dropping a stone into a calm pond - the field gets disturbed. The sensor detects this disturbance as a change in capacitance, which is essentially how much electrical charge the system can store.
22
22
Here's the process:
23
23
24
-
1. The sensor generates a small electric field
25
-
2. When you touch or approach the sensor, your body acts like a conductor
26
-
3. This changes the capacitance of the system
27
-
4. The microcontroller measures this change and determines if it's significant enough to register as a "touch"
24
+
1. The sensor electrode creates an electric field by applying a small voltage
25
+
2. When you approach or touch the sensor, your body becomes part of the capacitive circuit
26
+
3. This increases the capacitance between the sensor electrode and ground
27
+
4. The microcontroller detects this capacitance change (often by measuring timing differences) and determines if it's significant enough to register as a "touch"
28
28
29
-
## Using Capacitive Sensing on the Uno R4
29
+
## Using Capacitive Sensing on the UNO R4
30
30
31
-
The Uno R4 features a Capacitive Touch Sensing Unit (CTSU) that allows you to use certain pins as capacitive touch inputs. To utilize these capabilities, you can use the [Arduino_CapacitiveTouch library](https://github.com/arduino-libraries/Arduino_CapacitiveTouch).
31
+
The UNO R4 features a Capacitive Touch Sensing Unit (CTSU) that allows you to use certain pins as capacitive touch inputs. To utilize these capabilities, you can use the [Arduino_CapacitiveTouch library](https://github.com/arduino-libraries/Arduino_CapacitiveTouch).
32
32
33
33
### Compatible Pins
34
34
35
-
For both the Uno R4 WiFi and Minima boards, the compatible pins for capacitive touch are listed in the [Arduino_CapacitiveTouch library documentation](https://github.com/arduino-libraries/Arduino_CapacitiveTouch?tab=readme-ov-file#compatible-pins).
35
+
For both the UNO R4 WiFi® and Minima boards, the compatible pins for capacitive touch are listed in the [Arduino_CapacitiveTouch library documentation](https://github.com/arduino-libraries/Arduino_CapacitiveTouch?tab=readme-ov-file#compatible-pins).
36
36
37
37
**Arduino® UNO-R4 Minima:**
38
38
@@ -50,7 +50,7 @@ For both the Uno R4 WiFi and Minima boards, the compatible pins for capacitive t
50
50
| A2 (D16) | 22 | 2 | (1 << 6) |
51
51
| LOVE_BUTTON | 0 | 0 | (1 << 0) |
52
52
53
-
**Arduino® UNO-R4 WiFi:**
53
+
**Arduino® UNO-R4 WiFi®:**
54
54
55
55
| Arduino Pin | Touch Sensor Channel (TS#) | Channel Control Index (CHAC idx) | Channel Control Bit Mask (CHAC val) |
@@ -83,11 +83,11 @@ For more detailed usage and examples, refer to the [CapacitiveSensor library doc
83
83
84
84
## Example Code
85
85
86
-
Here's a simple example to get you started with capacitive sensing on the Uno R4. For this example, we are connecting a single piece of any conductive material to the pin `D0` on the Board.
86
+
Here's a simple example to get you started with capacitive sensing on the UNO R4. For this example, we are connecting a single piece of any conductive material to the pin `D0` on the Board.
87
87
88
88

89
89
90
-
***__Note:__ You will first need to install the library [Arduino_CapacitiveTouch](https://docs.arduino.cc/libraries/capacitivesensor/). To do so, open `Arduino IDE: Library Manager` → `Search "Arduino_CapacitiveTouch"` within _Manage Libraries_option → `Install` .***
90
+
**Note:** To install the `Arduino_CapacitiveTouch` library, open the Arduino IDE Library Manager, search for "Arduino_CapacitiveTouch" within the Manage Libraries option, and click Install.
91
91
92
92
```arduino
93
93
#include "Arduino_CapacitiveTouch.h"
@@ -131,4 +131,4 @@ Now that you have learned the basics, here are some fun and interesting project
131
131
132
132
## Conclusion
133
133
134
-
Capacitive sensing on the Arduino UNO R4 lets you add intuitive touch controls with minimal hardware, simply pair the board with the `Arduino_CapacitiveTouch` library. Tune the detection threshold for your environment (humidity, nearby electronics, etc.), and you can quickly scale from a single touch button to richer, multi-point interfaces.
134
+
Capacitive sensing on the Arduino UNO R4 lets you add intuitive touch controls with minimal hardware, simply pair the board with the `Arduino_CapacitiveTouch` library. Tune the detection threshold for your environment (humidity, nearby electronics, etc.), and you can quickly scale from a single touch button to richer, multi-point interfaces.
0 commit comments