With the easy code below and Gobetwino, can I open my .exe file of matlab.
It works perfect, thanks a lot for helping.
Now the next step is give one value to arduino.
Is this the right solution?
First, I have to save the matlab value (that I need) in a .txt - file.
Then, I have to read that value with the function RFLIN of Gobetwino.
Of is there a better solution?
Do someone know how to save one value in a txt-file with matlab?
This italicized text show the matlab code:
whitecount = sum(sum(BW)); %counter of the white pixels
if whitecount > 100
_ (I want to sent te value of whitecount to arduino)_
The bold text is the value that I want to give to Arduino.
Have you gotten a chance to read the manual? You’ll need to create a new command in Gobetwino, either and SPRID command type or a SPWEX command type depending on if you want it to block or not. I would guess you want it to block, it will make things easier later, so use the SPWEX command type. Then from the arduino
Now from what I can see this will not give you the output from the matlab process. What you’ll need to do is in matlab create a routine that checks to see if your output fill exists, and if it does delete it. Then create the file again and spit out the output from matlab into that file. In Gobetwino create an RFLIN command type to read a line from that file.