The Ouptut here is the RADAR plot and it consists of Legends which gives you the Guidelines on how to estimate the Object position and angle.
Upload the SPduino code to SPduino and to view the Output Plot,Press the 'Run' button in the Processing Software after saving the above Processing code.
The First sweep and Second sweep are the initial sweeps. You have to wait for two 180 degree sweeps before you can actually see the output.
After this, You will be able to see the Obstacle position with help of the Distance and Angle mentioned below the Plot.
Remember that,values Outside the Plot like 180,210,240,270,300 etc.. represent the Angle
value corresponding to the Servo motor.
The Distance value indicates the distance of the Obstacle from the Ultrasonic sensor.
Thus, if the Obstacle is at Angle 300 and Distance 57 (Say) , then you will see a ' Red circle '
indicating the Motion of obstacle in the radar Plot.
- Initially, the GUI of Radar plot will be as shown below. Here the First sweep in radar plot is ' Initial Sweep' (0-180 degrees). During this setup phase, the obstacle wont be detected and is done mainly to check the servo rotation .
- After this is the Second Sweep. Here, the obstacle presence is just detected, but not plotted. The obstacle which was present in both the first sweep and second sweep is detected here and is as shown.
- Now. from third sweep , the obstacle would be detected and if it is in motion / static, it would be indicated by a ' Red Circle '.[ Example: If the obstacle is at distance of 100 cm and at an angle of 90 degree, then the Red circle are plotted accordingly as shown below.]
- The AVERAGE value between the changing position of obstacle (if any) is indicated by the colour of Average as mentioned in Legend(found at top left of Radar plot).