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 次查看(过去 30 天)
显示 更早的评论
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?
回答(1 个)
Yu Li
2018-3-17
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 个评论
Benjamin Cyr
2018-3-17
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
2018-10-13
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
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Support Package for LEGO MINDSTORMS EV3 Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!