Introduction - If you have any usage issues, please Google them yourself
Qma7981 data manual is available in English and Chinese. The Chinese version is machine-readable.
The 7981 tilt angle and vibration interrupt setting procedure is attached. The tilt angle code is used to detect the level and tilt state, and the vibration interrupt is used to wake up the sleep state of MCU.
The picture is qma7981 pin connection diagram, suitable for my code.