it almost worked,
i first tried something like this :
char c;
void loop() {
int i = 0;
char buf[32];
portOne.write('x');
delay(200);
do {
c = portOne.read();
if(c != -1)
buf[i] = c;
i++;
delay(10);
} while ( c != -1);
Serial.print("x = ");
Serial.print((buf));
and that gave anwers like
ldadswdnajsndlka x = 32000
the number was correct and i like that, but the just needed to put off the "iuhuiasdansdn",
then i tried with the atoi fuction just changing the last line for Serial.print(atoi(buf));
it that gave me:
x = 32000
x = -32000
its working for -500 to -32000 then it goes to 32000 and get lowering to 500 for the other side of the inclinometer.
That wasnt bad but what i need is 500 to 64000 (and thats what sensor send i tested it on realterm).
Any idea what it could be ?
thanks