GY-521 to measure velocity of swinging door

Hi,

I wanted to measure the linear velocity of a swinging door with the GY-521(3 accel, 3gyro) sensor attached to the door (for example a car door). I have been reading about this topic but have not received any concrete information so far. My questions are two-fold:

  1. How to calculate the linear velocity of a swinging door in Arduino?
  2. Will, in this case, the accel/gyro data be enough to track velocity accurately? I know the errors stack up if the sensor is moving in 3D space.

Thank you.

Will, in this case, the accel/gyro data be enough to track velocity accurately?

Not the accelerometer. Read about why not at http://www.chrobotics.com/library/accel-position-velocity

The gyro measures the rate of rotation, which is the relevant quantity. Try it and let us know.

All points on the door have the same ANGULAR velocity. What part of the door are you trying to find the linear velocity of?