Check instruction time from PC/Mac to Lego Mindstorm EV3

2 views (last 30 days)
Hi,
somebody has an idea of how can I insert a timer in MATLab code for calculate the transmission time of the instruction from PC to Lego EV3?
An example of instruction could be "Start Motor A at speed of 20".
Thank you, Leonardo.
PS: sorry for the english, but I'm Italian.
  2 Comments
Nirav Sharda
Nirav Sharda on 1 Aug 2017
You can use 'tic' and 'toc' around the code, to calculate the round trip time to send the instruction to Lego EV3 and to get the results back.
Walter Roberson
Walter Roberson on 1 Aug 2017
tic and toc are less accurate than timeit() -- but timeit() has to repeat the code a number of times to determine the statistical properties, which might be a problem if the remote end does not expect that.

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB Support Package for LEGO MINDSTORMS EV3 Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!