Step 2: Write the Code
Let’s now write the code for the Arduino sketch. Launch the Arduino IDE and enter:
| Touch Sensor | Arduino | |
| VCC |
|
5V |
| GND |
|
GND |
| SIG |
|
Pin 7 |

