Problem with establishing a communication between sensor and matlab using .NET framework
1 次查看(过去 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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/249439/Annotazione%202019-11-21%20164516.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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/249440/Annotazione%202019-11-21%20164516.png)
Here is the error that I get, where myMAX30101 = Maxim.MAX30101.MAX30101.
![Annotazione 2019-11-21 164516.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/249441/Annotazione%202019-11-21%20164516.png)
Can anyone know how to solve it?
Thanks to everyone in advanced!!
1 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Software Development Tools 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!