Categories
Break This Glass

Distance

Checkbox 3

The sensor generates data

To test that the sensor does not present any malfunction, it is recommended to test it with a basic piece of code. In this case, it is the basic code the comes from its manufacturer.

Using a web browser, go to the Arduino IoT Cloud Web Editor. Once there, follow the steps in the following screen captures.

Go to Examples and select From Libraries.
Search Ultrasonic and load the “UltrasonicDisplayOnTerm” example.

Once you have loaded the example, save it with a new name, as you will be modifying it.

Select Save As…

Type the new name for the sketch and click OK to accept it.

Type a new name for the sketch.
Adjust the port according to the circuit (e.g., change to 0 if the sensor is plugged into D0).
Upload the code to the microcontroller.
Success. Saved on your online Sketchbook and done uploading […]

After uploading the code to the microcontroller, open the Monitor to check the output.

Open the Monitor and check that it prints according to the position of the sensor.