For relative rotation you need to use gyro.
An absolute orientation can be calculated vertically (because you can measure the direction of gravitation force), but horizontally you turn around the direction of gravity so that force is of no use. Compass could be a solution but probably too unreliable.
But for your volume usecase relative should be good. So try to read gyro.
(Didn't use IMU on puck yet myself so cannot help with specific commands, but do have experience from other hardware)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
For relative rotation you need to use gyro.
An absolute orientation can be calculated vertically (because you can measure the direction of gravitation force), but horizontally you turn around the direction of gravity so that force is of no use. Compass could be a solution but probably too unreliable.
But for your volume usecase relative should be good. So try to read gyro.
(Didn't use IMU on puck yet myself so cannot help with specific commands, but do have experience from other hardware)