Are you using something like an ESP32 to run the thing? I ask because a lot of them have a surprising amount of random sensors tacked on, like accelerometers. (capacitive, and hall-effect sensors too) Auto-orientation is probably a thing you'd need to design for though.