Programming error

Hi,
I think what the OP wants and isn't doing is.
Scan the Ultrasonic form 0 to 180deg in 1deg steps, each step record the Ultrasonic distance reading.
Pass each reading to the monitor.
Then scan the Ultrasonic form 180 to 0deg in 1deg steps, each step record the Ultrasonic distance reading.
But this time calculating the average of the readings of each step with the corresponding step from 0 to 180deg.

He will have to use arrays.
array1[] for 181 steps 0 to 180
array2[] for 181 steps 180 to 0

arrayaverage[] steps 0 to 180

so I would assume the OP can construct on screen a sonar map.

I think thats it.. Tom.... :slight_smile: