Is it possible to use two different toolboxes at once?
조회 수: 16 (최근 30일)
이전 댓글 표시
Hi!
I need to write a code that allows a Lego Mindstorms Ev3 robot to travel in a straight line until it encounters a magnetic field. The problem is that I have one toolbox for the code that the magnetic sensor uses and another toolbox that makes the robot travel in a straight line. Is it possible to make use of both toolboxes at once?
The toolbox I use for the magnetic sensor I got from
https://wiki.qut.edu.au/download/attachments/172135780/EV3.zip?version=1&modificationDate=1391352088000&api=v2
And the toolbox for the movement of the robot is Mathlabs own Lego Mindstorms toolbox and the code I use is the one you get when you type edit('gostraight_closeloop.m')
When I need to use the toolbox for the magnetic sensor I need to type:
b = Brick('ioType','usb');
And when I need to use mathlabs own toolbox to move the robot I need to type:
mylego = legoev3('usb');
Is it possible that I can use both of these toolboxes at once?
댓글 수: 0
답변 (1개)
Image Analyst
2018년 1월 4일
Yes. Nearly everyone here has multiple toolboxes and uses functions from several of them in the same program. It won't be a problem.
댓글 수: 3
Image Analyst
2018년 1월 5일
I don't know anything about the Lego functionality. What does "at the same time" mean to you? In the same program, like one line of code after the other? Or truly at the same time like you have the Parallel Processing Toolbox and you have completely separate threads running different code on each CPU?
참고 항목
카테고리
Help Center 및 File Exchange에서 ROS Toolbox Supported Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!