The invention discloses an intelligent wall and ground leveling electronic ruler which comprises a ruler body, a
photoelectric sensor, a setting function key, a processor, an error
data display screen, an error count-off
loudspeaker, an
electricity storage device and a switch. The bottom surface of the ruler body is a plane, the bottom surface of the ruler body is provided with a plurality of
light sensing perforations which are distributed at intervals, and the positions of the photoelectric sensors are in one-to-one correspondence with the positions of the
light sensing perforations; the processor is used for receiving the
signal of the
photoelectric sensor, determining the position and the size of the measured object, and comparing the position and the size with an internally set standard value to obtain an error index. The error
data display screen is used for displaying error indexes, and the error count-off
loudspeaker informs workers of the error indexes of measurement results through sounds. The
photoelectric sensor is used for detecting the flatness and perpendicularity of an object, the measured error index is informed to a worker in real time in a display and sound mode, the worker can conduct correction treatment in time, meanwhile, the detection result accuracy is high, the product intelligence degree is high, and the building or construction quality is effectively guaranteed.