Quantifying the readings from the accelerometer into “good” and “bad” swings required some data analysis.
Using Matlab we plotted the pitch vs. roll data from the accelerometer and made a determination that bad swings had the unique momentary condition that Roll > Pitch. This became our trigger condition in our microcontroller to activate the vibratory motors.
Additionally, care was taken in power management to make sure all components in our device had proper voltage and current, and that our power supply could operate the device for a useful amount of time.