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/built-in-examples/06.sensors/Knock/Knock.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,19 +33,17 @@ Open the serial monitor to see this text.
33
33
34
34
Piezos are **polarized**, meaning that voltage passes through them (or out of them) in a specific direction. Connect the black wire (the lower voltage) to ground and the red wire (the higher voltage) to analog pin 0. Additionally, connect a 1-megohm resistor in parallel to the Piezo element to limit the voltage and current produced by the piezo and to protect the analog input.
35
35
36
-
It is possible to acquire piezo elements without a plastic housing. These will look like a metallic disc, and are easier to use as input sensors. PIezo sensors work best when firmly pressed against, taped, or glued their sensing surface.
37
-
36
+
It is possible to acquire piezo elements without a plastic housing. These will look like a metallic disc, and are easier to use as input sensors. Piezo sensors work best when firmly pressed against, taped, or glued their sensing surface.
38
37
39
38

40
39
41
40
42
41
### Schematic
43
42
43
+
The piezo is attached to analog pin 0 with a 1 Megohm resistor in between the two legs. The placement of the resistor is used to save the piezo from damage from extra current. Without it, the analog pin might not be capable of reading the piezo's signal.
44
44
45
45

46
46
47
-
*A Piezo to attached to analog pin 0 with a 1 Megohm resistor*
48
-
49
47
### Code
50
48
51
49
In the code below, the incoming piezo data is compared to a threshold value set by the user. Try raising or lowering this value to increase your sensor's overall sensitivity.
@@ -56,6 +54,4 @@ In the code below, the incoming piezo data is compared to a threshold value set
56
54
57
55
You can find more basic tutorials in the [built-in examples](/built-in-examples) section.
58
56
59
-
You can also explore the [language reference](https://www.arduino.cc/reference/en/), a detailed collection of the Arduino programming language.
60
-
61
-
*Last revision 2015年07月29日 by SM*
57
+
You can also explore the [language reference](https://www.arduino.cc/reference/en/), a detailed collection of the Arduino programming language.
0 commit comments