How can i send real-time inputs and to get real time outputs from an Arduino One?
1 次查看(过去 30 天)
显示 更早的评论
Dear Matlab community,
I'm currently working on a school project, and since i am a bit stuck i would like to ask you guys for some advice. First, some background information:
My assignment is to "see what the Arduino One can do" for a research group conducting research into smart powergrids. They have two of them on the shelve from a previous project so the obvious first choice is to see if the Arduino One is suited for the job. The end goal is to use the arduino in a test-setup as a PI(D) controller. Since high frequency AC might be used, one of the problems that might occur is that the Arduino can't keep up with the number of integrations required. My task is to find out what the differences are when running a control algorythm on the Arduino One versus running the same algorythm on a pc. I would like to be able to simulate an input from Matlab into the Arduino, and then reading the output in real-time. This would then be plotted next to the same simulation (inputs and algorythm) performed on a pc, which would allow for comparison of the results.
I have already created a simple PI-controller in Simulink, and i have been able to upload it to the Arduino One. However, i don't know how to transmit the inputs to the Arduino and how to receive it's outputs. My guess is i could use the serial port, but until now i haven't been able to figure out how, nor have i been able to find a tutorial/guide or previous forum post on the same topic.
If any of you would be able to help, that would be awesome!
Cheers
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Arduino Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!