Question: Add the following code to your program. must be included to activate the function of sonar(). #include #define TRIGGER_PIN 12 // Arduino pin tied to
Add the following code to your program. must be included to activate the function of sonar().
#include
Add sonar.ping_cm() to read the distance in terms of cm in loop(). Send the distance information back to PC through serial communication.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
