Ok I tried with xmlelement but i have some problem...
I do this, I know that is crap but i am not a programmer.
I do a simple program in rogorealm to detect the center of movement in front of camera. I take the x variable of this point and i write it on a a .txt file with this settings:
row delimiter: [CR] (what is this??)
column delimiter: comma
text qualifier: double quote
and then i read the file with processing:
Code:
lines = loadStrings("cogx2.txt");
println(lines);
index = index + 1;
with 12 framerate.
now i am blocked because I can't take only data without doublequotes and spaces, I think I have to use regular expression to takeout quotes and save only the variable. Anyone has some advise??
i tried something like:
Code:if (lines > 400) {
leftservo.write(180);
rightservo.write(0);
delay(250);
}
(this would be right turn for 250 milliseconds if something moves on the right side of the camera)
but i can't do this because lines it is not only a variable...
my goal would be to send data to arduino from processing, and then write code that use processing data to react to movement
(rotate servos for example).