How to save a m-file on the lego ev3 brick?

1 vue (au cours des 30 derniers jours)
Philipp Rau
Philipp Rau le 13 Nov 2015
Commenté : Walter Roberson le 19 Nov 2015
Hello, I need to know how i can save an matlab m-file on a lego ev3 brick using an usb-connection. I didn't found anything on google. I would like to select the saved program on the brick and run it with the buttons. But how to get it there? At the moment i am just able to run the programm while the brick ist connected with the usb-cable. please help me :) Thanks

Réponses (1)

Walter Roberson
Walter Roberson le 13 Nov 2015
You could possibly transfer the source to the ev3, but none of that series can execute MATLAB m files. The process of using an ev3 involves generating code that the ev3 can use, and that code is not m files at all.
  2 commentaires
Philipp Rau
Philipp Rau le 13 Nov 2015
so then please tell me HOW can i program in matlab (not simulink) and then transfer to the ev3? I havn't even a clue how to access the ev3 for saving a file. I just can run my m-file while connected, and thats really not useful.
Walter Roberson
Walter Roberson le 19 Nov 2015
Looking around a bit, it appears that you can ssh to the ev3. It appears to require the username root and the password is empty (not the word "empty", just press return at the password prompt). If this is the case then you can also scp() files on to the EV3 and then ssh in and start them executing.
The EV3 can be programmed in a number of different programming languages. I do not know which one Simulink uses, but it probably uses C or C++ together with a cross-compiler for the ARM processor.
If you want to convert MATLAB code into something that would run on the EV3, the simplest way would be to include it in a MATLAB Function Block in Simulink and use Simulink to generate and run the model. But otherwise you are going to need to use MATLAB Coder and a cross-compiler. MATLAB Coder is not available for Student Version licenses.
There might be some other method that I have missed.

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB Support Package for LEGO MINDSTORMS EV3 Hardware dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by