I may have solved my own problem, at least for establishing the Matlab connection to the EV3. I decided to try rebooting my laptop, although the installation of the hardware support package does not mention this as being necessary. The connection now works.
Unable to connect Lego EV3 to Matlab via USB in Matlab R2017B
2 views (last 30 days)
Show older comments
Matlab will not connect to my Lego EV3. I have two EV3 bricks, one with firmware 1.09H and the other with firmware 1.04H but fail to connect to Matlab with either. Latest versions (17.2.0) of Matlab and Simulink EV3 hardware support packages installed yesterday (in that order).
>> legoev3('usb') Error using legoev3 (line 308) Failed to connect to EV3 through USB. Please check your USB connection.
The USB connection is good since it operates the EV3 via the Lego Mindstorms (Labview) software. I also tried connecting via WiFi, which also works with the Mindstorms software, but not with Matlab. Suggestions?
5 Comments
Answers (1)
Yu Li
on 17 Mar 2018
I connect by combintion of ‘USB' and 'Wifi’ simultaneously,There is no other way to do. by the way my firmware 1.09E. wish for help your work.
2 Comments
Benjamin Cyr
on 17 Mar 2018
I was able to solve my issue in connecting with USB. I was using a Third Party Sensor (the HiTechnic Angle Sensor) with an ID that was not registered in the LEGO EV3 Support package. As far I as I understand, when MATLAB tries to connect, it goes through the IDs of the sensors that are connected to the EV3. Since it didn't recognize the 3rd Party ID, it would not connect. It would then give the very unhelpful error: 'Unable to connect'. I'm not sure if there is a better way to do it, but I had to modify the support package to include the ID for the new sensor in order to get it to connect. Then everything worked fine.
nathan guillou
on 13 Oct 2018
Hello, I am facing the same issue : I want to use the Hitechnic Angle sensor but it doesn't work. Could you describe more precisly how you solved the issue ? thank you
See Also
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!