👉 Don't forget to check arduino-tutorials.net for more Arduino tutorials and projects. If you have questions, don't hesitate to ask them in de comments. Remember: There are no stupid questions 😃 🔔 Want to stay up-to-date with the latest videos? Subscribe to the Bas on Tech channel!
I have watched so many tutorials on Arduino but no one has ever talked about millis() function. I always wanted to use the concept of debounce in my project but I didn't know how to. Thank you so much for the help.
Great to hear! This tutorial of mine also uses millis() so might be useful to check as well 😃 arduino-tutorials.net/tutorial/long-press-button-on-the-arduino-with-millis
Hi, not sure why, i have included the simple code in IDE, yet when i compile it it gives me error codes This is the code, which i think is identical to yours. What am I missing? void setup() { // put your setup code here, to run once: pinMode(5, INPUT); pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN; LOW); } void loop() { if(digitalRead(5) == HIGH) { digitalWrite(LED_BUILTIN, HIGH); } else { digitalWrite(LED_BUILTIN, LOW); } delay (100); }
Hi there! Can You attache this zensor to a glove .. so,when i press with the glove . I will like to show me o a screen the force with witch i press mesured in kilograms You think that could be posibile ?
Hi there, i have a question. I guess you know the game Tablesoccer. I am a professional player and it can get hard with speeds up to 80 km/h to recognize if the ball went into the goal or not. Sometimes it bounces out right away and it looks as if the goalie blocked the ball although it was a goal. This is a problem in tournaments. My thoughts were, if it is possible to have a soft sensor-mat which you can glue to the walls inside the goal. Do you think this would be possible in a way, that it is extremely accurate? Thank you :-)
Hi, I don't think this is the best sensor to use. Speeds of 80 km/h will completely destroy the device, and besides it is a captive sensor so it does not work on a ball. My suggestion would be to use a laser on the goal boundary. I've found this video of people who already made such a system: ruclips.net/video/unXU5m7EqaU/видео.html
Unfortunately not, this sensor is capacitive which means it needs to be touched by conductive materials which allow current to flow through like our finger.
Not that I know. There might be a sensor which can detect a certain resistance when something approaches the sensor. Maybe you can do something with a LDR or PIR?
Hello Sir, I have this sensor and i need some help please. I need to control two LEDs with this sensor. 1 touch turn on or off LED1, while double touch turn on or off LED2. how can I do it?
@@BasonTech Acutally I didnt even try because i dont know how am going to write the code. If you can make a video it would be great Thanks for replying
@@BasonTech I watched the video and its really helpful but still i cant program double touch and single touch. What i want to do is, single touch turn on or off led1, double touch turn on or off led2, then long touch to turn on or off led1 and led2
This is still the same as the longpress video with an extra state. You need to measure the time between taps to determine if it single, double or longpress.
👉 Don't forget to check arduino-tutorials.net for more Arduino tutorials and projects.
If you have questions, don't hesitate to ask them in de comments. Remember: There are no stupid questions 😃
🔔 Want to stay up-to-date with the latest videos? Subscribe to the Bas on Tech channel!
Thank You so much @BasonTech for the debounce code and the wonderful explanation.
Great I could help! Have fun with your projects! 😃
I have watched so many tutorials on Arduino but no one has ever talked about millis() function. I always wanted to use the concept of debounce in my project but I didn't know how to. Thank you so much for the help.
Great to hear! This tutorial of mine also uses millis() so might be useful to check as well 😃 arduino-tutorials.net/tutorial/long-press-button-on-the-arduino-with-millis
Thanks for sharing that nice example also the sensor alone can made the same and soldering pin 4, 5, 6 of the CMOs together acts as a toggle switch.
Hi Luis, thanks for sharing! 👍🏻
Hi, not sure why, i have included the simple code in IDE, yet when i compile it it gives me error codes
This is the code, which i think is identical to yours. What am I missing?
void setup()
{
// put your setup code here, to run once:
pinMode(5, INPUT);
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN; LOW);
}
void loop()
{
if(digitalRead(5) == HIGH)
{
digitalWrite(LED_BUILTIN, HIGH);
} else {
digitalWrite(LED_BUILTIN, LOW);
}
delay (100);
}
The compiler is right, there is a small typo in the code. Look very careful for all commas, semicolons etc. I am sure you can spot the typo 😃
Amazing tutorial :) thank you a lot. Have 20 these similar touch sensors will do a work clock for me with pause :)
Nice! 😃
Awesome, thank you.
Thanks! My pleasure! 😃
Hi there! Can You attache this zensor to a glove .. so,when i press with the glove . I will like to show me o a screen the force with witch i press mesured in kilograms
You think that could be posibile ?
That would be a bit too much to ask of this basic sensor. I can't think of another sensor which can achieve this.
Hi there,
i have a question. I guess you know the game Tablesoccer. I am a professional player and it can get hard with speeds up to 80 km/h to recognize if the ball went into the goal or not. Sometimes it bounces out right away and it looks as if the goalie blocked the ball although it was a goal.
This is a problem in tournaments.
My thoughts were, if it is possible to have a soft sensor-mat which you can glue to the walls inside the goal.
Do you think this would be possible in a way, that it is extremely accurate?
Thank you :-)
Hi, I don't think this is the best sensor to use. Speeds of 80 km/h will completely destroy the device, and besides it is a captive sensor so it does not work on a ball. My suggestion would be to use a laser on the goal boundary. I've found this video of people who already made such a system: ruclips.net/video/unXU5m7EqaU/видео.html
How would you use this on an added LED
Sorry I don't understand your question. Add a LED to?
Thanks man this helped
Glad I could help! 😃
can the sensor be activated by anything? (like you gat a pen or a toothpick, will it turn on?)
Unfortunately not, this sensor is capacitive which means it needs to be touched by conductive materials which allow current to flow through like our finger.
Ok, thanks. This was really helpful
Great! Glad I could help 😃
5:50 so that means if you hold touching led will blink?
It will not since the if is not triggered when the sensor is LOW.
Any way I can wire up one of these to act as a PC power button?
Sure! You'll then need a relay to switch the PC power. This relay is switched by the touch sensor.
Can you list the components used
It's listed in the video description 😃
thnks for the vid ---- can they detect velocity, how hard you are touching?
Not really, this is a digital sensor, not analog. You can of course detect how long it was pressed.
is there a touchless sensor ? am trying to find it
Not that I know. There might be a sensor which can detect a certain resistance when something approaches the sensor. Maybe you can do something with a LDR or PIR?
@@BasonTech thanks for your fast answer
Hello Sir,
I have this sensor and i need some help please. I need to control two LEDs with this sensor. 1 touch turn on or off LED1, while double touch turn on or off LED2. how can I do it?
Hi Ahmed, what have you tried already and what issue did you ran into?
@@BasonTech
Acutally I didnt even try because i dont know how am going to write the code. If you can make a video it would be great
Thanks for replying
The videos are already there 😃 I've made tutorials on LED, long press and the touch sensor. Combine these and you should have what you want.
@@BasonTech
I watched the video and its really helpful but still i cant program double touch and single touch.
What i want to do is, single touch turn on or off led1, double touch turn on or off led2, then long touch to turn on or off led1 and led2
This is still the same as the longpress video with an extra state. You need to measure the time between taps to determine if it single, double or longpress.
Why my sensor LED turn red instead of green?
As far as I can see there is only 1 LED on the PCB. Therefore I guess the manufacturer used a red LED instead of a green one.
@@BasonTech Its green sir, mine is red. lately i just know that i burnt my sensor by plugging it onto 5V Pin.
Interesting according to the specs it should be able to operate between 2V and 5.5V
@@BasonTech In my opinion its better to use the 3.3V before continuing to higher volt like 5V etc to prevent burnt the sensor
WHAT IS THE USE OF THIS SENSOR
for example: you can use it a a button without having moving parts
What is that touch sensor's model name?
Hi, in the description of the video you'll find all the parts used in the tutorials. The sensor is this one: arduino-tutorials.net/r/0cVKLS 😃
@@BasonTech Oh thank you~
Where is the code?
I cant find it on the website
On the bottom of arduino-tutorials.net/tutorial/reading-touch-sensor-with-arduino you see a link to Github 😃