Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[P097] needs update of documentation #5164

Open
chromoxdor opened this issue Nov 17, 2024 · 15 comments · May be fixed by #5165
Open

[P097] needs update of documentation #5164

chromoxdor opened this issue Nov 17, 2024 · 15 comments · May be fixed by #5165

Comments

@chromoxdor
Copy link
Contributor

Testet with "ESP_Easy_mega_20240822_collection_A_ESP32s3_4M316k_CDC.bin" and later on GPIO 7 and others on ADC1

The touch values are always to high (above 10000) and therefore touch is triggering constantly.
When touched the value goes up to almost 30000.

@TD-er
Copy link
Member

TD-er commented Nov 17, 2024

Can you remove -DBOARD_HAS_PSRAM from the board definition.

"extra_flags": "-DARDUINO_TASMOTA -DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=1 -DUSE_USB_CDC_CONSOLE -DESP32_4M -DESP32S3 -DARDUINO_USB_CDC_ON_BOOT=1",

The 4M build is using esp32s3cdc-qio_qspi as board definition.

I never tested the touch plugin on ESP32-S3 since upgraded to IDF 5.x
Do these also trigger an event? If so, then the event queue will just fill up as it cannot handle so many events in a short time.

@chromoxdor
Copy link
Contributor Author

Do these also trigger an event?

They do...

@chromoxdor
Copy link
Contributor Author

Can you remove -DBOARD_HAS_PSRAM from the board definition.

I will try it...

@TD-er
Copy link
Member

TD-er commented Nov 17, 2024

Do these also trigger an event?

They do...

So you're essentially running out of memory...

@chromoxdor
Copy link
Contributor Author

So you're essentially running out of memory...

this could cause the reboots.. but as i wrote in the forum it doesn´t have anything to do with the WiFi issue..

@TD-er
Copy link
Member

TD-er commented Nov 17, 2024

Ah OK, now I get it... I think.
Values are too high, so you can't do anything with them.

@chromoxdor
Copy link
Contributor Author

Ah OK, now I get it... I think. Values are too high, so you can't do anything with them.

exactly :)

@chromoxdor
Copy link
Contributor Author

Can you remove -DBOARD_HAS_PSRAM from the board definition.

This didn´t do anything...

@tonhuisman
Copy link
Contributor

tonhuisman commented Nov 17, 2024

Not sure if there's something wrong with this plugin 🤔
I get all the events that I've enabled, and only a new event if the threshold (+ or -) since the last value is exceeded.

There's a base-pressure, on my S3 board without any wires connected to the pin it's roughly in the 10000 to 20000 range, depending on the touch pin used, and when touching the GPIO pad, a few-hundred is changed in the value and only a single, or sometimes double, touch-event is generated. So the default threshold of 20 seems to work fine.
Maybe if you have a (long) wire connected to the GPIO pad, it will work like an antenna, and pick up interference, f.e. from the WiFi signal, close-by?

Edit: I'm on the latest mega code, and using a LittleFS build, so latest IDF 5.3.x framework build.

@chromoxdor
Copy link
Contributor Author

chromoxdor commented Nov 17, 2024

There's a base-pressure, on my S3 board without any wires connected to the pin it's roughly in the 10000 to 20000 range,

So maybe it is my understanding of the plugin that is buggy...
I thought, the base pressure (i assume its the same as the Current Pressure)must be below the Touch Threshold.
I have nothing connected to the pin and all I get is this with default settings:

6202: Touch : ADC1 ch6 (T7): 11548
6402: Touch : ADC1 ch6 (T7): 11994
6702: Touch : ADC1 ch6 (T7): 11535
7002: Touch : ADC1 ch6 (T7): 11544
7402: Touch : ADC1 ch6 (T7): 11535
7902: Touch : ADC1 ch6 (T7): 11501
8302: Touch : ADC1 ch6 (T7): 11540
9202: Touch : ADC1 ch6 (T7): 11529

So no events i guess. I thought these where the events but i think i am mistaken. Mhmmmm strange

Edit: I'm on the latest mega code, and using a LittleFS build, so latest IDF 5.3.x framework build.

And you have no WiFi issues?

@tonhuisman
Copy link
Contributor

And you have no WiFi issues?

No, not with this unit.

On my S3-zero board (similar to what you showed in the forum) WiFi is working OK, and I haven't checked touch yet, but the board get really hot, not yet sure what is causing that. Still investigating.

@chromoxdor
Copy link
Contributor Author

chromoxdor commented Nov 17, 2024

but the board get really hot, not yet sure what is causing that. Still investigating.

Mine is around 60°C and with ECO mode it´s around 40°C which is fine i guess...

So no events i guess. I thought these where the events but i think i am mistaken. Mhmmmm strange

Oh man, i forgot to enable rules again. 🤦‍♂️

So to get a Touch event the "touch value" needs to be higher than Current Pressure + Touch Threshold?

@chromoxdor
Copy link
Contributor Author

So to get a Touch event the "touch value" needs to be higher than Current Pressure + Touch Threshold?

This seems to work for me. I think I was a bit confused because I think this contradicts the documentation.
When I touch a pin, the value goes up, not down, and the values are very different from what the documentation says.

@tonhuisman
Copy link
Contributor

So to get a Touch event the "touch value" needs to be higher than Current Pressure + Touch Threshold?

This seems to work for me. I think I was a bit confused because I think this contradicts the documentation. When I touch a pin, the value goes up, not down, and the values are very different from what the documentation says.

Partial comment from the framework source for touchRead()

 * Read touch pad (for ESP32 values close to 0 mean touch detected /
 * for ESP32-S2/S3 higher values mean touch detected)

As this plugin is initially coded ca. 5 years ago, when no S2/S3 was in sight, the documentation may be somewhat outdated.

@chromoxdor
Copy link
Contributor Author

Ok… so i will try to update the documentation in the coming days.

@chromoxdor chromoxdor changed the title [BUG][P097] Touch isn´t working on ESP32-s3 [P097] needs update of documentation Nov 17, 2024
@chromoxdor chromoxdor linked a pull request Dec 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants