An electronic device comprising: a housing, provided with an opening and a positioning groove; a functional device, movably mounted on the housing; a driving mechanism, mounted in the housing and comprising a piezoelectric device, wherein the piezoelectric device is adapted to vibrate when being energized; and a transmission mechanism, comprising a cam, a connection portion and a positioning portion, wherein the functional device is connected to one end of the connection portion, and the other end of the connection portion is configured to engage with the cam, the positioning portion is hingedly connected to the connection portion; the positioning portion comprises a positioning hook, the cam is disposed at an inner side of the functional device, the cam comprises a wheel body and a protruding portion, the protruding portion is disposed at a wheel rim of the wheel body, the wheel body is mounted on the piezoelectric device, and the piezoelectric device is adapted to drive the cam to rotate between a first location and a second location, wherein in a case that the cam is at the first location, the functional device is located in the housing, and in a case that the cam is at the second location, the protruding portion is adapted to drive at least part of the functional device to extend out of the housing from the opening; and in a case that the cam is at the second location, the positioning hook is engaged with the positioning groove in a limiting manner to limit the functional device to retract into the housing from the opening, wherein the positioning portion further comprises a blocking segment; the blocking segment is connected to the positioning hook, and the blocking segment is located at one side of a hinge point of the positioning portion facing away from the positioning hook; and in the process that the cam rotates towards the first location from the second location, the cam is in contact with the blocking segment to drive the positioning hook to be detached from the positioning groove. a housing, provided with an opening and a positioning groove; a functional device, movably mounted on the housing; a driving mechanism, mounted in the housing and comprising a piezoelectric device, wherein the piezoelectric device is adapted to vibrate when being energized; and a transmission mechanism, comprising a cam, a connection portion and a positioning portion, wherein the functional device is connected to one end of the connection portion, and the other end of the connection portion is configured to engage with the cam, the positioning portion is hingedly connected to the connection portion; the positioning portion comprises a positioning hook, the cam is disposed at an inner side of the functional device, the cam comprises a wheel body and a protruding portion, the protruding portion is disposed at a wheel rim of the wheel body, the wheel body is mounted on the piezoelectric device, and the piezoelectric device is adapted to drive the cam to rotate between a first location and a second location, wherein in a case that the cam is at the first location, the functional device is located in the housing, and in a case that the cam is at the second location, the protruding portion is adapted to drive at least part of the functional device to extend out of the housing from the opening; and in a case that the cam is at the second location, the positioning hook is engaged with the positioning groove in a limiting manner to limit the functional device to retract into the housing from the opening, wherein the positioning portion further comprises a blocking segment; the blocking segment is connected to the positioning hook, and the blocking segment is located at one side of a hinge point of the positioning portion facing away from the positioning hook; and in the process that the cam rotates towards the first location from the second location, the cam is in contact with the blocking segment to drive the positioning hook to be detached from the positioning groove.