How to trigger a callback function in a GUI by a digital input signal (instead of mouse click/position)?

1 次查看(过去 30 天)
I want to build a GUI for instrument control and data acquisition ("event-driven programming").
When running the GUI Matlab continuously checks if certain user-defined "events" happen, e.g. "mouse click in region ..." or "mouse pointer is over region ..." and calls a user-defined callback function when such events occur.
I have a digital input signal (accessed via readDigitalPin(a,pin), where a is an arduino object), and I want to execute a certain callback function when this input goes from Low to High or vice versa.
How can I make Matlab "continuously" listen to this input (as for the mouse position/click)?
From
"In the case of MATLAB UIs, most events are user interactions with the UI, but the UI can respond to other kinds of events as well , for example, the creation of a file or connecting a device to the computer."
I conclude that this functionality is available but I would need some reference describing its implementation.
Thanks for your inputs, Raph

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simultaneous and Synchronized Operations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by