0

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?

2
  • 1
    See: source.android.com/docs/core/interaction/sensors and a bit of research shows that a AOSP fork of Android exists for RaspberryPi4 konstakang.com/devices/rpi4/AOSP13 that appears to support 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) Commented Sep 1, 2023 at 2:20
  • That's valuable info. Thanks! Anyone here already been there and can give me pointers on how to connect one of those IMU boards via i2c and have Android recognize them? Commented Sep 1, 2023 at 11:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.