byte[(12)*256]+(13)] = Serial.read( ,x);
That mess has nothing to fix, it is not code.
Here is a re-write of what you were doing, kind of.
void ReadPacket( void )
{
if( Serial.available() >= 18 ){
if (Serial.read()==0x7E ){
for(int i =0 ; i< 11 ; i++)
Serial.read();
int i_Data[ 3 ]; //3 elements for x, y, z
for(int i =0 ; i< 3 ; i++)
i_Data[ i ] = makeWord( Serial.read(), Serial.read() );
/*
i_Data[ 0 ] contains X
i_Data[ 1 ] contains Y
i_Data[ 2 ] contains Z
*/
Serial.print( "X: " );
Serial.println( i_Data[ 0 ] );
Serial.print( "Y: " );
Serial.println( i_Data[ 1 ] );
Serial.print( "Z: " );
Serial.println( i_Data[ 2 ] );
}
}
return;
}
This won't help you unless you know what you were doing wrong. I suggest you read my first post and that link before you confuse yourself further.