LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DC Motor Control LIFA Arduino LabVIEW

Hello,

 

I have a simple setup in which I have connected my Arduino Mega 2560 as following - 

 

Connected to PC via USB

 

PWM - pin 5

Motor logic 1 - pin 6

Motor logic 2 - pin 8

 

I am driving motor using L293D. To control motor, I am writing 1/0 to the corresponding digitalWrite function. But when I stop the VI and start again, the motor experiences a small jerk. I believe it is because of some garbage value in the serial buffer of the arduino which gets passed to the arduino when the VI starts again. Is there a way I can clear out the serial buffer after opening and before closing the arduino

0 Kudos
Message 1 of 1
(2,275 Views)