long microsecondsToCentimeters(long microseconds)
{
return (microseconds / 29 / 2);
}
The variable "microseconds" only has scope (exists) inside that function.
Why are you using it here?
Wire.write(microseconds); // respond with message of 6 bytes