1. A method of performing an action associated with a gesture performed by a user of a device having a processor and a sensor providing a sensor output, the method comprising: executing on the processor instructions that cause the device to: transition the device to a training mode upon receiving, from the user, a training start, request; during the training mode: while the user performs the gesture, monitor the sensor to detect an identified sensor output identifying the gesture during a training period between the training start request and the training completion request; identify, during the training period, a restricted period that is shorter than the training period and during which the identified sensor output identifies the gesture; associate with the gesture the identified sensor output of the sensor during the restricted period; and associate an action with the gesture; transition the device to a recognition mode upon receiving, from the user, a training completion request; and during the recognition mode: monitor the sensor output of the sensor; and upon detecting that the sensor output matches the identified sensor output associated with the gesture, perform the action associated with the gesture.
1. A method of performing an action associated with a gesture performed by a user of a device having a processor and a sensor providing a sensor output, the method comprising: executing on the processor instructions that cause the device to: transition the device to a training mode upon receiving, from the user, a training start, request; during the training mode: while the user performs the gesture, monitor the sensor to detect an identified sensor output identifying the gesture during a training period between the training start request and the training completion request; identify, during the training period, a restricted period that is shorter than the training period and during which the identified sensor output identifies the gesture; associate with the gesture the identified sensor output of the sensor during the restricted period; and associate an action with the gesture; transition the device to a recognition mode upon receiving, from the user, a training completion request; and during the recognition mode: monitor the sensor output of the sensor; and upon detecting that the sensor output matches the identified sensor output associated with the gesture, perform the action associated with the gesture. 2. The method of claim 1 , wherein executing the instructions on the processor further causes the device to, upon detecting an addition to the device of an added sensor, transition the device to the training mode to detect the identified sensor output of the added sensor while the user performs the gesture.