MPU6050 + Arduino for CPR

I need vertical up–down depth (5 cm target), no rotation. How to do gravity removal + ZUPT and ignore tilt? Any code/tips? 🙏
3 Replies
raptor
raptor17h ago
you can remove gravity by subtracting 9.8 from the positive z axis, and mpu6050 has a built in gyroscope, so you can use that to find out the angle and then use trigonometry to calculate the depth
Darawshe123
Darawshe123OP16h ago
i try and is not working this my code
Darawshe123
Darawshe123OP16h ago
Maybe there are something I didnt notice help please

Did you find this page helpful?