Components and supplies
Touch Sensor
Arduino UNO
Male/Female Jumper Wires
Project description
Code
TouchSensor.ino
arduino
Upload this code:
Downloadable files
Schematics
Schematics
Schematics
Schematics
Schematics
Schematics
Schematics
Schematics
Comments
Only logged in users can leave comments
arcaegecengiz
2 years ago
I've fixed it
Anonymous user
6 years ago
Hello, mate. I think this have a little correction of pinMode(). That should be INPUT instead of OUTPUT for getting the data from touch sensor.
arcaegecengiz
2 years ago
I've fixed it
West_Fighter
6 years ago
In your code: The code Copy and paste this code to the Arduino IDE and upload it. void setup() { pinMode(2, OUTPUT); Serial.begin(9600); } void loop() { if (digitalRead(2) == HIGH)Serial.println("Sensor is touched"); delay(500); } Then, open the Serial Monitor and set the baud rate to 9600. When you touch it, you will see a "Sensoristouched" message. First you write "pinMode(2,OTUPUT);" than digitalRead(2) == HIGH. At OUTPUT you can digital or analogWrite ;-) And you lost one ";" can you see where???
arcaegecengiz
18 Followers
•6 Projects
8
5
Anonymous user
2 years ago
Hello, mate. I think this have a little correction of pinMode(). That should be INPUT instead of OUTPUT for getting the data from touch sensor.