?? s_out_ini.m
字號:
function shakehand=s_out_ini
%v is the value of the voltage
%n is the number of the channel
%v_code=32768+((v*8.8/1.9-2.5)*10^4/2);%計算5622的電壓碼,加運放
%v_code=32768+((v-2.5)*10^4/2);%計算5622的電壓碼
s = serial('COM1');
fopen(s)
set(s,'DataBits',8)
s.BaudRate=2400;
fwrite(s,170,'uint8')%輸出握手信號AA
fwrite(s,170,'uint16')
%s.BytesAvailable
readasync(s);
shakehand = fread(s,1)
s.BytesAvailable;
%get(s,{'BaudRate','DataBits','Parity','StopBits','Terminator'})
fclose(s)
delete(s)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -