A controlling method for an electronic device, wherein the electronic device comprises a housing, a display screen, a Hall sensor assembly and a rotatable assembly, the display screen is disposed at a side of the housing, the rotatable assembly comprises a substrate, wherein the rotatable assembly further comprises a laser projector disposed in the substrate, the laser projector is configured to project a laser pattern with speckles to an object to be measured to enable the electronic device to acquire a depth image of the object, the substrate is rotatably installed to the housing such that the laser projector is selectively oriented toward a first side where the display screen is located or toward a second side opposite to the display screen; and the controlling method comprises: determining an orientation of the laser projector through the Hall sensor assembly; projecting a laser in a first mode by the laser projector when the laser projector is oriented toward the first side where the display screen is located; and projecting a laser in a second mode by the laser projector when the laser projector is oriented toward the second side opposite to the display screen, the laser projected in the second mode having a greater energy than that of the laser projected in the first mode, wherein the electronic device further comprises an image collector disposed at a surface of the substrate where the laser projector is located; when the laser projector projects a laser, the laser projector projects the laser at a first operating frequency to a scene, the laser forms a laser pattern with speckles, which is projected onto the object to be measured in the scene; and wherein the controlling method further comprises: acquiring collection images by the image collector at a second operating frequency, the second operating frequency being greater than the first operating frequency; distinguishing, among the collection images, a first image collected when the laser projector does not project the laser from a second image collected when the laser projector projects the laser; and calculating the depth image according to the first image, the second image and a reference image. determining an orientation of the laser projector through the Hall sensor assembly; projecting a laser in a first mode by the laser projector when the laser projector is oriented toward the first side where the display screen is located; and projecting a laser in a second mode by the laser projector when the laser projector is oriented toward the second side opposite to the display screen, the laser projected in the second mode having a greater energy than that of the laser projected in the first mode, wherein the electronic device further comprises an image collector disposed at a surface of the substrate where the laser projector is located; when the laser projector projects a laser, the laser projector projects the laser at a first operating frequency to a scene, the laser forms a laser pattern with speckles, which is projected onto the object to be measured in the scene; and wherein the controlling method further comprises: acquiring collection images by the image collector at a second operating frequency, the second operating frequency being greater than the first operating frequency; distinguishing, among the collection images, a first image collected when the laser projector does not project the laser from a second image collected when the laser projector projects the laser; and calculating the depth image according to the first image, the second image and a reference image. acquiring collection images by the image collector at a second operating frequency, the second operating frequency being greater than the first operating frequency; distinguishing, among the collection images, a first image collected when the laser projector does not project the laser from a second image collected when the laser projector projects the laser; and calculating the depth image according to the first image, the second image and a reference image.