[Solved] Fixing drifting problem for elechouse voice recog module v3 and MPU6050

I just had to calibrate the MPU6050 sensor with the voice recognition module in place and connected.

For my head mouse project which is based on the voice recognition module V3.1 for left click, double click, right click operations, MPU 6050 accelerometer and gyroscope for cursor movement, I am facing a problem. When I just use the MPU 6050 accelerometer and gyroscope sensor for cursor movement, the mouse cursor moves smoothly (calibration has been done). But when I integrate it with the voice recognition module, the cursor starts to drift. My code is given as an attachment.

I have been using an arduino pro micro for this project. Please help. I have calibrated my MPU6050 , so it does not drift while working alone. But after integration with voice recog module (including calibration) , the drifting problem returns. I am powering the setup using a USB cable connected from the laptop to the arduino.

N.B: This is a project from a client. According to requirements, I want to make the head mouse wireless. I need suggestions for that too.

The circuit connection is given as an image.

vr_click_control_22-06-19.ino (3.42 KB)