Streamlit App for Real-Time Mobile Gyroscope and Orientation Sensor Data

I’ve built a Streamlit component that enables real-time access to gyroscope, accelerometer, and orientation sensor data from mobile phones.

The app uses the DeviceOrientationEvent Web API inside an HTML/JavaScript iframe and transfers data back to Python via query parameters. Sensor values update in real time and can be used for motion tracking, gesture control, tilt-based interfaces, and more.

Tested on Android Chrome/Firefox.

Link:
https://phone-gyroscope-orientation-sensor-python.streamlit.app/

Use cases include:

  • Tilt-controlled apps
  • Real-time motion tracking
  • Sensor-based input for interactive web tools
  • Research tools using mobile sensor data

Let me know if it’s useful or if there are features you’d like to see added.

2 Likes