Reading an analog sensor via Arduino in Simulink Desktop Real Time External (SLDRT)
2 次查看(过去 30 天)
显示 更早的评论
Hi,
as part of a project where I am missing a real measurements card to read a sensor, I am now forced to do the reading of a that sensor for my control loop with some Arduino and stream it into Simulink.
For now I have a Simulink Desktop Real-Time External (SLDRT - External) program for the control of two robots and would now like to add the data from the Arduiono to this program. By know I know that there exists a Simulink Support Package for Arduino Hardware (https://de.mathworks.com/matlabcentral/fileexchange/40312-simulink-support-package-for-arduino-hardware) but I also read, that these blocks do not work in external mode ( https://de.mathworks.com/matlabcentral/answers/712848-control-arduino-using-gamepad-through-simulink ), which is why I am opening this topic.
I further found another post explaining on how to bypass the support package by using serial blocks (https://github.com/leomariga/Simulink-Arduino-Serial) but I did not find any information if the serial blocks are available in SLDRT - External.
My main question would be How to read an analog sensor using an Arduino into a Simulink Desktop Real-Time External program? But maybe one of the other questions could help me solve the program also:
- Is the official Simulink Support Package for Arduino Hardware by now available for SLDRT - External?
- Are the serial blocks available in SLDRT - External?
- How exactly does the serial communication with the Arduino look like? Do I need a program running on the Arduino or just when I use the serial blocks or any other own implementation?
I am very new to this topic, so thank you in advance for any hint.
Kind regards,
Max
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Target Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!