An electronic device control program whereby a computer built into an electronic device driven by electrical power from a power source and provided with a piezoelectric actuator that has a vibrating body having a piezoelectric element that vibrates due to the application of a drive signal, is caused to function as:
- vibration detection means for detecting the vibration of the vibrating body and outputting a detection signal;
- driving means for receiving the electrical power in order to create a drive signal from the power source, creating the drive signal, supplying the drive signal to the piezoelectric element at a prescribed drive frequency, and supplying the drive signal to the piezoelectric element at a modified drive frequency set so that the vibration state of the vibrating body approaches the target vibration state when the vibration state detected from the detection signal differs from the target vibration state;
- voltage detection means for detecting at least one of the voltage of the power source and the voltage of the drive signal of the piezoelectric actuator;
- and
- control means for controlling the driving means so that the drive signal is set to a modified drive frequency after being temporarily set to the prescribed drive frequency when the reduction rate of at least one of the voltage of the power source detected by the voltage detection means and the voltage of the drive signal is higher than the pre-set standard reduction rate.