Meowbit has a built-in accelerometer for measuring rotation and acceleration of the device, as well as detecting different gestures.
MakeCode Arcade Coding Tutorial
Load Controller Extension
Blocks for Controller Extension
The rotation value ranges from 0 to 1023.
Kittenblock Coding Tutorial
Blocks for onboard sensors
Getting the acceleration
Getting the rotational acceleration
Getting the tilting degree
The gestures can be detected in 2 ways.