Error: Function definition not supported in this context. Create functions in code file [MATLAB/ARDUINO]
조회 수: 7 (최근 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!