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[80];
snprintf(report, sizeof(report), "Distance: %+6d",averageDistance); 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.