Skip to main content
Freedom_Neo
Senior
May 23, 2022
Question

How do we know if our hand is on the button at TouchGFX?

  • May 23, 2022
  • 7 replies
  • 5627 views

How do we know if our hand is on the button? e.g; If our hand is on a button, the led is always on, if we raise our hand over that button, the led turns off.

This topic has been closed for replies.

7 replies

MasterT
Lead II
May 23, 2022

Proximity sensors. Capacitive, thermal, IR reflective, make your choice.

Andrew Neil
Super User
May 23, 2022

What kind of "button" may have an influence...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Freedom_Neo
Senior
May 23, 2022

You misunderstood the question as the title is incorrect. I meant the prepare button with TFT GUI. You can read the post below.

https://community.st.com/s/question/0D53W00001YdFteSAF/long-press-button-increment-fast-value

Andrew Neil
Super User
May 23, 2022

"You misunderstood the question as the title is incorrect"

:face_with_tears_of_joy: :grinning_face_with_sweat: :>

So what does the TouchGFX documentation tell you?

Presumably, you get an event to tell you when it's "touched", and another to tell when that touch has gone away ... ?

"You can read the post below"

So why start a new thread if it's still the same question?

Did the solution provided there by @Yoann KLEIN​  not work?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Freedom_Neo
Senior
May 23, 2022

It's okay to detect that you're touching the button. I can't detect that you're pulling your hand away from the button

Did the solution provided there by @Yoann KLEIN (ST Employee)​ not work?

No, dont work

Andrew Neil
Super User
May 23, 2022

"No, dont work"

Then feed-back in the other thread so that he can help you further...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Freedom_Neo
Senior
May 27, 2022

Hi,

I worked as below project. But this aplication works in the simulator but doesnt work at the hardware dewolopment board

Andrew Neil
Super User
May 27, 2022

What, exactly, does "doesn't work" mean?

What debugging have you done to find out what's happening?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Freedom_Neo
Senior
May 30, 2022

It works in the simulator environment, but it doesn't work properly on my board. While my hand is on the button, it has to continuously increase the number, but it does not do it.

I have attached two videos showing how it works both in the simulator and on my board. You can look there.

Freedom_Neo
Senior
May 30, 2022

Working status on my board

Osman SOYKURT
Technical Moderator
May 30, 2022

Hello Freedom_Neo,

In your videos, your UIs are not the same on your simulator and your board. Is t still the same application ?

Also, the question is already answered here :

https://community.st.com/s/question/0D50X0000CBl0asSQB/long-touch-detect-on-stm32l4r9aieval

and here : https://community.st.com/s/question/0D53W00001YdFteSAF/long-press-button-increment-fast-value

As Alexandre RENOUX said, you have to create a new class for your custom button because the standard Button class in TouchGFX only triggers on clicked. So in your Designer, do not use a Button widget.

There's also another solution given by RGajd.1. Have you tried this one ?

Try to investigate a bit more about how to create your own custom buttons, and let us know if you need help on doing it :)

/Osman

Osman SOYKURTST Software Developer | TouchGFX