Stamp -> Matlab
soorya
Posts: 2
Hi All,
I am an amateur in the field of microcontrollers. This forum has been proved to be very useful for exchanging the information.
I have a problem communicating with stamp through the matlab, I can explain the problem briefly
I am trying to send two data values from matlab and store it in two different valued in the basic stamp . Using those Variables as the counters I am switching On and off the LEDS conencted to two control lines. The code is pretty simple but when I run th program, the lights doest work the way it should.
Is there any method that I can send some information from stamp to matlab so that it will be acting as a pointer so as to stop the data to be sent and resume the data to be sent
I am attaching the matlab code and the stamp code ( verymuch simplified version ) for those interested in helping me sort out the problem
Thanks in advance
Soorya
I am an amateur in the field of microcontrollers. This forum has been proved to be very useful for exchanging the information.
I have a problem communicating with stamp through the matlab, I can explain the problem briefly
I am trying to send two data values from matlab and store it in two different valued in the basic stamp . Using those Variables as the counters I am switching On and off the LEDS conencted to two control lines. The code is pretty simple but when I run th program, the lights doest work the way it should.
Is there any method that I can send some information from stamp to matlab so that it will be acting as a pointer so as to stop the data to be sent and resume the data to be sent
I am attaching the matlab code and the stamp code ( verymuch simplified version ) for those interested in helping me sort out the problem
Thanks in advance
Soorya
Comments
·· I'm not familiar with MatLab, but I'm going to assume it uses the programming port to exchange data with the Stamp so you can't use your DEBUG window?· If this is the case, do you have a Serial LCD display you could use for debugging?
·· Specifically what I would try is to confirm that the data you're sending the BASIC Stamp is what it's getting.· This could be done by displaying these values on another device (Usually DEBUG window) such as an LCD.· If the values are as expected, then it's got to be a code error.· Not knowing exactly what you're trying to do, I cannot tell if your code is doing that.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I am trying to store 2 values in two varibles declared as u and v onto stamp and those 2 values are calculated and sent by matlab via serialport. I have been using the LEDs for displaying if the values i am sending are being recieved or not as I am making the counter set to be equal to u ( value i have sent ) and v and making the pins 1 & 2 ( for which i have connected the LEDS) high and low for that count.
Thanks
Surya
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
·· Found a couple of small bugs in the attached code, but I fixed those and what I have here works as you requested...
So if this doesn't work on your end, it has to be either the MatLab code or something in the communication.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com