Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

%###############################################################################

############################
%###############################---MATLAB CODE BELOW---#########################
############################
%###############################################################################
############################
%this sends serial three digit numbers to the PIC
%this works when the PIC is using interrupts to get the serial data too.
SerPIC = serial('COM4');
set(SerPIC,'BaudRate', 9600, 'DataBits', 8, 'Parity', 'none','StopBits', 1, 'Flo
wControl', 'none');
%set up the camera com port
fopen(SerPIC);
'#############--start--###########'
fprintf(SerPIC, '%s', '008');
fprintf(SerPIC, '%s', '016');
pause(1)
fprintf(SerPIC, '%s', '004');
fprintf(SerPIC, '%s', '001');
'--done--'
fclose(SerPIC)
delete(SerPIC)
clear SerPIC

You might also like