The Arduino Serial functionality can be used for both debugging and sending data to and from the device via other communication channels such as BlueTooth.
Start the serial channel in the Setup method with:
In the loop you can use the following to print out a single value.
Serial.println( _ _ _ _ );
Multiple variables are a bit more complicated but it can be achieved with:
char report; snprintf(report, sizeof(report), "Distance: %+6d",averageDistance); Serial.println(report);