I'm trying to parse my values which i get from my 6 DOF inertial measurement unit , from arduino to processing. So far, following results have been accomplished.
1. Sent the float values as string to processing. Converted them back to float in processing and displayed.
Problem : When i tilt my IMU, the values changes accordingly, but these changes are not affected in processing, but it is successfully affected in arduino serial monitor. There is only slight variation in processing, say from 5.8 to 6.2 when i do a 90 degree tilt, whereas the actual should have been like about 5.8 to 70.4 or something.
the whole arduino-code would be interesting. do you have delays between sending messages? Arduinos usually run faster than the processing sketches framRate. At the moment you read one line from the serial-buffer in every draw-loop, but you send three lines from arduino. I would recommend to send only one string with all values from arduino, otherwise they could get mixed up. Then try to use serialEvent(), it's more reliable than reading the messages in draw().
The problem could be, that when the arduino loop() only takes for example 5 ms to execute (i think i can't test it without your hardware), it runs 200 times per second, sending 3*200 messages via serial. Your processing-sketch runs on 50 frames per second parsing 1 message on every frame, so it takes 6 seconds to parse the messages that you send in the first second. This should result in a huge delay after several seconds.
Because of this, you should use serialEvent(), wich is called every time a serial message is recieved.
Still is see a problem in differentiating the different values, this is why i recommend to send them in one message, like this for example:
I changed the arduino code like you've posted above. And this is the processing sketch with serialEvent. They aren't showing the values,value,value,value show 0.0. I have a feeling the serialEvent function is not getting invoked. Heres the code.