For a project, I want to use a Raspberry Pi (or similar) running Android. Just using a mobile device is not an option (due to ruggedness, always-on, breakout-options etc.)
The other thing my project needs is sensor input from an accelerometer/gyroscope, providing my "RasPi installed Android" with readings for orientation, in pitch and roll (I don't need azimuth).
On a native smartphone, accel/gyro are always hardware-based ref 1 ref 2 and just work (via i2c). Now RasPi doesn't have those sensors. Also, I don't know if Android would detect those automagically if it would.
How can I add an accel/gyro sensor to RasPi (or similar) that would be detected and be naturally read out just like with a smartphone running Android?
I know I can add a third-party USB accel/gyro, but these usually stream CSV data and would be a separate data stream from the "native" accel/gyro Android input, right? Any options to have data be fed into the native Android orientation sensor sink?
Sensors (using external GPIO I2C modules e.g. MPU6050, LSM6DS3, LSM303DLHC, BME280/BMP280, and APDS9930 accelerometer, gyroscope, magnetometer, temperature, pressure, humidity, ambient light, and proximity)