A method for controlling a power transmitting device including a power transmitting coil that outputs power to a power receiving coil, a case that includes the power transmitting coil inside thereof, and a mobile member arranged on a surface of the case at a position overlapping the power transmitting coil, the method comprising:
- moving, if the mobile member holds a metal foreign object, the metal foreign object from the position overlapping the power transmitting coil to a position not overlapping the power transmitting coil by moving the mobile member from the position overlapping the power transmitting coil to a position not overlapping the power transmitting coil before the power transmitting coil begins to transmit the power to the power receiving coil;
- causing the power transmitting coil to output the power to the power receiving coil;
- and
- moving, if another metal foreign object comes to the position overlapping the power transmitting coil when the mobile member is located at the position not overlapping the power transmitting coil, the other metal foreign object from the position overlapping the power transmitting coil to a position not overlapping the power transmitting coil by returning the mobile member from the position not overlapping the power transmitting coil to the position overlapping the power transmitting coil in the state where the mobile member holds the foreign matter.