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
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?