Problem with establishing a communication between sensor and matlab using .NET framework

4 次查看(过去 30 天)
Hi everyone,
I'm trying to develop a simple GUI with App Designer in matlab. The purpose is to read some data from a sensor (MAX30101 with evaluation kit) when I pressed a precise button. Thanks to the software included with the sensor and some tutorial online, I'm able to establish a connection with .NET framework and I alredy tested it in script file that it worked. The next step is to build a simple GUI, but here comes the problems.
Now the problem is that inside the buttonpushedfcn I add some listener, with the purpose to "listen" from sensor if the FIFO buffer are ready to put out my data. This listener is bound to a callback function that I defined within the app and it is linked to myMAX30101, the object created with the .dll file. Now, this callback what parameters must take in input?
I link some useful code.
Here I'm in the buttonpushedfcn where i add listener to myMAX30101, already define
Annotazione 2019-11-21 164516.png
Here are the definition of the callback that I put with App Designer->Function-> Private Function. I passed as input src and evtdata: atlhough Matlab suggest me to pass as 1° argument the name of the app.
Annotazione 2019-11-21 164516.png
Here is the error that I get, where myMAX30101 = Maxim.MAX30101.MAX30101.
Annotazione 2019-11-21 164516.png
Can anyone know how to solve it?
Thanks to everyone in advanced!!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Software Development Tools 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by