retrieving using basic stamp data from matlab
ayln
Posts: 1
hi,
Im working on a project on boe bots and ım using matlab with a connection to basic stamp. I made the connection but ı need to use a basic stamp variable in matlab but ı cant get the variable from basic stamp. Matlab has to check the data which is described in basic stamp and do its job. So far I have the codes below..
basic stamp:
Code:
.......
this goes on and ı need to check busy variable from matlab.
matlab:
Code:
fopen for openıng the file and fread to retrieving variable.
I dont know whats wrong ?? please help
Im working on a project on boe bots and ım using matlab with a connection to basic stamp. I made the connection but ı need to use a basic stamp variable in matlab but ı cant get the variable from basic stamp. Matlab has to check the data which is described in basic stamp and do its job. So far I have the codes below..
basic stamp:
Code:
.......
busy VAR Byte GOSUB checkConnection SEROUT TX, Baud, [busy] busy=0 DO numberOfPulses = 0 DO SEROUT TX, Baud, [busy] busy=1 SERIN RX, Baud, [command] IF (command = "0") THEN numberOfPulses = numberOfPulses * 10 + 0 ELSEIF (command = "1") THEN numberOfPulses = numberOfPulses * 10 + 1 ........
this goes on and ı need to check busy variable from matlab.
matlab:
Code:
function [] = go(deviceNo, command) fid = fopen('Main.bs2','busy'); b=fread(fid); while(b == 0) if(deviceNo == 1) commandArray = char(command); ....... end end
fopen for openıng the file and fread to retrieving variable.
I dont know whats wrong ?? please help
Comments
Welcome to the forums!
Your blog will be deleted, as this is the appropriate forum to post to. A blog may not be view for days, but these forums are active by the minute.