I'm writing an UWP application for a Raspberry Pi. The Pi is build in the official 7" touch screen case.

I was wondering if there is a possibility to flip the screen 180 degrees, when the user holds the Pi upside down. I'm also not sure if there is a gravity sensor in the Pi to detect the orientation?


Raspberry Pi does not have an orientation sensor built in.

You can simply use of of the GPIOs along with a tilt sensor to detect the flip / Orientation.

Here is are example of tilt switches.

ball tilt switch mercury tilt switch

Here is a project regarding connecting a tilt switch to raspberry pi. It includes a YouTube video demonstrating how to interface with tilt switch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.