The utility model is suitable for the technical field of detection devices, and provides a sensor, which comprises a base, a control module and a detection device are arranged in the base, and the detection device is in communication connection with the control module; the rotating piece is rotatably connected to the base; the
rotary encoder is arranged on the base, the
rotary encoder is in communication connection with the control module, and a rotating part of the
rotary encoder is connected with the rotating piece; the display
assembly is arranged on the base and is in communication connection with the control module; the control module is used for controlling the angle of the image displayed by the display component according to the position
signal; according to the sensor provided by the embodiment of the invention, the rotating part and the rotary
encoder are arranged, so that the position information of the rotating part is acquired through the rotary
encoder, and the position information is converted into the position
signal to be sent to the control module; and a control module is arranged, the orientation of the image displayed on the display
assembly is controlled through the control module, and after the control module receives the position
signal sent by the rotating piece, the control module controls the image displayed on the display
assembly to rotate.