필터 지우기
필터 지우기

How can I use the function millis() for Arduino in Matlab?

조회 수: 17 (최근 30일)
Kim Soltau
Kim Soltau 2019년 6월 12일
댓글: Walter Roberson 2019년 6월 12일
Hello,
I want to use a function like millis() in Matlab to control my Arduino MEGA without delay.
I have the Arduino Support Package, but when I want to use "millis()", there is an error "undefined function".
Is there a function with the same functions in Matlab?
Thanks for your help!

답변 (2개)

Walter Roberson
Walter Roberson 2019년 6월 12일
You can look at etime or at tic and toc,
However there is no way to control arduino without delay.
In particular the standard connection of serial over USB can be fired at most 1000 times per second and typically less. It is common for people to have difficulty exceeding 40 Hz unless they write custom code on the arduino side.
In theory you might be able to achieve lower latency with an Ethernet connection, but I do not mean wireless.

Vishnu Vardhan
Vishnu Vardhan 2019년 6월 12일
편집: Walter Roberson 2019년 6월 12일
you can use temporalCount() function.
  댓글 수: 1
Walter Roberson
Walter Roberson 2019년 6월 12일
I am not clear how knowing the number of times a chart has woken up helps control an arduino??

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by