Arduino硬件包(五):MATLAB利用Arduino硬件包控制步进电机
clear all;global a;a = arduino();%%正转while get(hObject,'Value')global a;writeDigitalPin(a,'D8',1);writeDigitalPin(a,'D9',0);writeDigitalPin(a,'D10',0);writeDigitalPin(a,'D11',1);pause(0.0002);writeDigitalPin(a,'D8',0);writeDigitalPin(a,'D9',0