MATLAB put LED on serial port
1 answer
You should be able to control strings DTR
and RTS
(on DB-9 connectors on pins 4 and 7 respectively) from MATLAB. According to the link, serial port objects have properties DataTerminalReady
and RequestToSend
that can be toggled. For example,
S = serial('com1');
for ii = 1:5
set(S, 'RequestToSend', 'on');
pause(1)
set(S, 'RequestToSend', 'off');
pause(1)
end
the LED connected to the pin will flash RTS
five times.
0
source to share