Error: Function definition not supported in this context. Create functions in code file [MATLAB/ARDUINO]
8 次查看(过去 30 天)
显示 更早的评论
Hello,
I'm currently attempting to get MATlab to read a serial communication with an Arduino & BNO055 sensor. I'm still fairly new with MATlab, but am receiving the error displayed in the image below. I used an Arduino IDE intially, to establish serial communication, now I'm stuck attempting to get MATlab to read. Any ideas for what I should do?
Thanks for the help in advanced!
John

0 个评论
采纳的回答
Walter Roberson
2018-11-6
Set the com port variable like you do now. Then on the command line
[s, flag] = setupSerial(comPort);
Without the "function" part of the line.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Support Package for Arduino Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!