I am using an ADXL335 Accelerometer with my Arduino Uno R3. Datasheet of the sensor linked to the name.
I am trying to calculate tap velocity using the set up. My integration code is working fine, or atleast seems like it is given the snappy and discrete nature of the application. I have coded to stop integrating as soon as a tap is completed, i.e. inertial acceleration goes back to 0 to negative, as accelerator moves up in natural bounce motion. And the final velocity is recorded separately before being reverted back to 0.
But, the problem is... it's not recording every sample. It records the velocity, seemingly accurately for one tap... takes a long time, missing several samples in between. I have also noticed that only after I set the accelerometer at initial state of parallel to ground, it records the next sample or tap.
Ideally, I want it to atleast record 6 samples per second. How do I go about fixing this?