Main Site Documentation

Distance US3 Module


#1

I just buy “Distance US3 Module”, and I’m expecting to receive it in the next days. But I don’t see any documentation or any driver to use it.

Can someone help me ?


#2

Which mainboard you are using it with?


#3

a FEZ Spider


#4

The new SDK just released I the beta forum has that module in the VS toolbox.

Once you add it to the designer you can do this: distance_US3.GetDistanceInCentimeters()

       // Summary:
        //     Takes a number of measurements, averaging the distance, and returns the detected
        //     distance in centimeters.
        //
        // Parameters:
        //   numMeasurements:
        //     The number of measurements to take and average before returning a value.
        //
        // Returns:
        //     Distance that the module has detected an object in front of it. Will return
        //     SENSOR_ERROR if the number of errors was reached, which can be caused by
        //     an object either being too close or too far from the sensor.

There’s a property of AcceptableErrorRate:


// Number of errors that can be accumulated in the GetDistanceInCentimeters function
// before the function returns an error value;