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
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,15 @@ Capacitive sensing is a technology that detects changes in capacitance to determ
16
16
17
17

18
18
19
+
## Required Hardware
20
+
To use the library you will need one of the compatible boards:
21
+
-[Arduino® UNO R4 WiFi](https://docs.arduino.cc/hardware/uno-r4-wifi)
22
+
-[Arduino® UNO R4 Minima](https://store.arduino.cc/products/uno-r4-minima)
23
+
24
+
You will also need:
25
+
- Wire
26
+
- Something that can affect the electric field to touch (metal objects, materials with moisture, even bananas! Experimentation is key!)
27
+
19
28
## How Capacitive Sensing Works
20
29
21
30
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.
@@ -81,12 +90,17 @@ The **Arduino_CapacitiveTouch** library provides several functions to work with
81
90
82
91
For more detailed usage and examples, refer to the [CapacitiveSensor library documentation](https://docs.arduino.cc/libraries/capacitivesensor/).
83
92
84
-
## Example Code
93
+
## Detecting Touch Example
94
+
95
+
### Circuit
85
96
86
97
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
98
88
99

89
100
101
+
102
+
### Code
103
+
90
104
**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
105
92
106
```arduino
@@ -120,6 +134,8 @@ void loop() {
120
134
}
121
135
```
122
136
137
+

138
+
123
139
## Creative Project Ideas
124
140
125
141
Now that you have learned the basics, here are some fun and interesting project ideas:
0 commit comments