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

5 views (last 30 days)
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

Answers (0)

Categories

Find more on Instrument Control Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!