From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,273 Views)