In one embodiment, a medical system includes an emitter or a detector configured to interface with a patient and integrated with a housing of a handheld medical instrument, a motion detection device integrated with the housing and configured to detect motion of the handheld medical instrument and convert the motion to motion data, and a processor configured to receive the motion data and programmed to issue a command related to control of the medical system based on a correlation between the motion data and the command.