2

I am a newbie.. I am integrating Arduino controller with Matlab

I have connected my arduino DUE board in COM7. And I have also connected a DC Motor in one of the digital output pins (D3)

So when I just execute the matlab built in arduino function to initialise or establish a connection my motor runs for a second and then stops. I dont want my motor to run initially. Is there a solution or an alternative to do this.

a = arduino('COM7', 'Due');

Thanks in advance.

3
  • How have you connected your motor? Commented Jun 9, 2016 at 20:37
  • @Majenko I have just connected the motor to the output lines of the Arduino Motor Shield directly (using an external power source). Commented Jun 10, 2016 at 10:55
  • It sounds like there is a problem with the Matlab function, but I guess you can't fix that. So here is my sledge hammer approach, put a PNP transistor in the supply line to the motor shield and control it from a digital port on the Arduino. The digital pin will start up high and this will block the power to the motor, when Matlab sends the digital lines to low, power will flow, but you will have control. You will need to ask someone about what transistor (and other bits) to use to achieve this, but there my theory. Hope it works. Commented Jun 10, 2016 at 12:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.