sending slider values from serial port....
1 次查看(过去 30 天)
显示 更早的评论
I have a slider in GUI ranging from value 1-100. What i want is whatever value i select, i shall be able to send it to the terminal using Serial port communication... Any ideas??
0 个评论
采纳的回答
David Sanchez
2013-6-18
% To construct a serial port object:
s1 = serial('COM1');
s2 = serial('COM2', 'BaudRate', 1200);
% To connect the serial port object to the serial port:
fopen(s1)
fopen(s2)
my_value = get(handles.my_Slider_handle,'value');
fprintf(s1,value)
2 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 String Parsing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!