PDA

View Full Version : dc motor, monster moto shield VNH2SP30 ,arduino uno and matlab



koronus
01-06-2019, 11:05 PM
hi
I want to control a dc motor with a monster moto shield VNH2SP30 ,arduino uno and matlab ,I checked the shield with arduino program and it worked as the datasheet of the shield the digital pins 7 and 8 are used to run the dc motor 1 but in matlab I write this code:

a=arduino('com9','uno');
writeDigitalPin(a,'D7',1);
writeDigitalPin(a,'D8',0);


but nothing happened and the dc motor didn't run

jwatte
01-16-2019, 03:51 PM
Are you running the correct firmware on the Arduino?
Can you make a LED blink using the Matlab code? (The LED lives on pin 13 IIRC)
If you hook up an oscilloscope on the serial RX/TX lines on the Arduino, does it get any packets?