[討論] arduino IO於GUI的問題

看板MATLAB作者 (定板小瓜)時間9年前 (2014/09/29 07:10), 9年前編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
大家好,我使用別人分享的代碼於arduino介面執行燒入,通訊matlab gui人機介面 ,但只能plot,不能顯示"變量",以致於不能以陣列形式帶入公式,需要什麼樣的函數 或是辦法(現階段只知道analogRead()或fscanf()),請問要如何才能抓到我的感測器 analog的讀值。非常謝謝! 我的部分程式: axes(handles.axes3) interv=20; passo=1; t=1; x=0; global a; while(t<interv) b=a.analogRead(0); x=[x,b]; plot(x); axis([0,interv,400,600]); pause(4) grid t=t+passo; drawnow; end arduino io通訊包 http://www.mathworks.com/matlabcentral/fileexchange/32374-matlab-support-for-arduino--aka-arduinoio-package- -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 120.108.10.197 ※ 文章網址: http://www.ptt.cc/bbs/MATLAB/M.1411945818.A.421.html ※ 編輯: s4A111039 (120.108.10.197), 09/29/2014 07:12:49
文章代碼(AID): #1KA9LQGX (MATLAB)