A lawn mower comprising: a frame (10) actuating means (20) for moving said frame (10) relative to a work surface (L) one or more blades (30) mounted on said frame (10) for cutting the grass present on said work surface (L) a plurality of sensors (S1, S2) for generating detection signals (SR) representative of a distance of a mass (M) relative to said frame (10) a control unit (40) adapted to determine, as a function of said detection signals (SR), whether said mass is at a distance from said frame (10) which is included within a predetermined value range, and to adjust the operating conditions of said lawn mower (1) as a function of said detection signals (SR) a selection circuit (50) interposed in a circuit between said control unit (40) and sensors (S1, S2) and suitable to selectively enable a connection between each of said sensors (S1, S2) and an input of said control unit (40).