best way to process data received via XBEE?

THANKS to your advice i managed getting the very exact result i wanted; that is controlling any kind of robot with my processing code.

I still have a little trouble which i didn't expect:

on the processing side i got things like that: XBEESerial.write ( data ) ; // data is the converted value (*100) i get from my sticks
and data ranges from 0 to 999.

on the arduino side i got this: int data = Serial.read() ; println ( data );

so i expected to see integers come out, but what is weird is that data i get ( after processing sending and xbee reception) only ranges from 0 to 258
which is cool but as not relevant as i want it to be. Because on the processing side i managed to write something coverting the data to an accurate range, and expected to use it on the arduino.

Any ideas? ( i tried coding " long data = Serial.read();" but still got the same pb :roll_eyes: )

thanks for your help, i still almost succeeded to my first very cool application :grin: