This is a great video, but I was sincerely hoping that you'd address how to use Touch14 for active shielding. It's the most under-documented aspect of this whole ESP32 capacitive touch landscape. (See page 23 of the ESP32-S3 hardware design guidelines, section 3.12)
Not on topic, but not sure where else to ask! I see references to struct in sketches (eg esp_now) and I wonder what they are and how they differ from classes. I've tried to Google and asked chatgpt but find the explanations rather technical. If you could cover this in a future video that would be great. Thanks for all your superb videos.
Thanks Robert! structs essentially help you organize and collect variables into a single "entity" They "sound" sort of technical, but are in usage superduper easy and fun to implement. Not sure if you're a PEA academy member or not, but in our pointers course we talk about using structs, and passing them to functions. I'll see if I can get something out about them on UA-cam. All the best!
🤔 I guess it could be used in those lamps with a long metallic stem whose luminosity can be rosen or diminished just by touching the stem continously or by little spaced touches. No?.
Your demo implies the touch pin suffers from a bounce effect like a button. Would you use the same debounce routine as you would a button? I frequently use a Schmitt trigger for this. Would a Schmitt trigger function in the same way for both?
i use something like this to debounce the button press: volatile bool touchDetected = false; volatile unsigned long lastTouchTime = 0; const unsigned long debounceDelay = 50; // Adjust as needed void handleTouch() { unsigned long currentMillis = millis(); // Check if it's been enough time since the last touch if (currentMillis - lastTouchTime >= debounceDelay) { // Record the time of this touch lastTouchTime = currentMillis; // Set the flag to indicate a valid touch touchDetected = true; } }
your videos are very explanatory and clear! good job and keep going! we need more
Thanks! Will do!
This is a great video, but I was sincerely hoping that you'd address how to use Touch14 for active shielding. It's the most under-documented aspect of this whole ESP32 capacitive touch landscape. (See page 23 of the ESP32-S3 hardware design guidelines, section 3.12)
This interrupt is for touch. Is there one for release?
Not on topic, but not sure where else to ask! I see references to struct in sketches (eg esp_now) and I wonder what they are and how they differ from classes. I've tried to Google and asked chatgpt but find the explanations rather technical. If you could cover this in a future video that would be great. Thanks for all your superb videos.
Thanks Robert! structs essentially help you organize and collect variables into a single "entity"
They "sound" sort of technical, but are in usage superduper easy and fun to implement. Not sure if you're a PEA academy member or not, but in our pointers course we talk about using structs, and passing them to functions. I'll see if I can get something out about them on UA-cam. All the best!
🤔 I guess it could be used in those lamps with a long metallic stem whose luminosity can be rosen or diminished just by touching the stem continously or by little spaced touches. No?.
Definitely!
Could this be used to make a theremin?
Your demo implies the touch pin suffers from a bounce effect like a button. Would you use the same debounce routine as you would a button? I frequently use a Schmitt trigger for this. Would a Schmitt trigger function in the same way for both?
i use something like this to debounce the button press:
volatile bool touchDetected = false;
volatile unsigned long lastTouchTime = 0;
const unsigned long debounceDelay = 50; // Adjust as needed
void handleTouch() {
unsigned long currentMillis = millis();
// Check if it's been enough time since the last touch
if (currentMillis - lastTouchTime >= debounceDelay) {
// Record the time of this touch
lastTouchTime = currentMillis;
// Set the flag to indicate a valid touch
touchDetected = true;
}
}
I thought the use of millis() was not valid in an ISR routine.