Preparations :

Create an account at Wia if you haven't already - refer to this tutorial to get started with Wia here.

Set up your Dot One - You will need to have set up a Dot One and you can find the tutorial on how to do that Here.

Once you have finished the tutorials above and learned all about the Dot One , you are all set to do this tutorial below.

Create a Code Project

Note: This portion requires a decent background in coding, specifically in C++ in order to understand how the Dot One and TFT Screen work to print the prices

Below is the code for this project which you can follow by reading the comments attached to the side of the code.

Feel free to try and rewrite this code yourself so you can better understand the device! Some advice if you are having trouble is to make a temporary Block Project and take note of what code is pasted into the preview window when you drag certain blocks over!

You can then upload the above code to your Dot One by clicking the rocket icon and the process of detecting proximity of an object will then begin . If you would like to understand more of what is happening:

The HC-SR04 device sends an ultrasound "Trigger"

The sound bounces of an object in front of the device

When the wave returns to the device, we calculate the distance it has travelled based on the time it took to return to the sensor.

Now that we have successfully wrote the software for this tutorial , it's time to wire up the hardware to make the proximity detector behave as required.

Wiring Connections

Using 4 jumper wires connect the Dot One to the proximity sensor as shown below:

Once the connections are made, you are ready to connect the Micro USB cable and the Dot One to your computer.

Now, that we have a load of data funnelling back into the platform the most efficient manner of reading the above data would be to set up a line graph widget so we can view all data points as they occur in a human readable way.

Viewing Proximity Data

After the first data comes back, you will be able to view each reading from the Wia Platform - just head over to Overview(Home Icon on Left Sidebar) -> Click Add a Widget. Choose the widget Line Graph. When set up , the readings should be presented as below:

Congratulations and Well Done on completing the tutorial , hope you enjoyed it.