A method for automated mobile devices to identify and avoid dangerous edges or drop-offs. Rangefinder sensors are installed on the underside of devices to calculate distances to the work surfaces. Distances are monitored for changes greater than a predetermined threshold. Distance changes greater than the threshold cause the device to execute methods or algorithms for avoiding the identified area.