This is a simple type tilt sensor module. When the free-moving ball inside reaches one end, it completes the circuit between the two terminals, indicating that there is tilt.
Since the ball inside the sensor is highly sensitive to movement, it is recommended to use the module in an angled or vertical position rather than horizontally. It provides a digital output. When tilt is detected, the data pin outputs 5V, and the onboard LED lights up.
It can be used with many microcontroller platforms, especially Arduino.