Also, the implanted device is readily programmed to recognize different coded patterns or sequences of taps by the patient, to do such things as turning off the device if it is currently in the stimulating mode, or to increase or decrease the intensity and/or frequency of the stimulation, or even to delay the initiation of stimulation for a selected time interval.