Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8374

Interfacing (DSI, CSI, I2C, etc.) • Re: What parts do I need to build a 9DOF orientation tracker using a Raspberry Pi 5 (like a phone's rotation sensor)?

$
0
0
O.k. .. as that's a topic which I'm also interested in I would like to raise some questions to the more knowledge audience:

1. enabled an Invensense MPU-9250 IMU by adding below to config.txt

Code:

dtoverlay=i2c-sensor,mpu9250,int_pin=4,i2c1
2. installed 'iio-sensor-proxy'. That package should take care of screen orientation (if there is an accelerometer) and brightness (if there is a light sensor) etc.

Code:

sudo apt install iio-sensor-proxy
3. checked if all is there up&n running by running

Code:

udevadm info --export-db
which gives me (yes, I knew before the IMU is working)

Code:

P: /devices/platform/axi/1000120000.pcie/1f00074000.i2c/i2c-1/1-0068/iio:device0M: iio:device0R: 0U: iioT: iio_deviceD: c 509:0N: iio:device0L: 0E: DEVPATH=/devices/platform/axi/1000120000.pcie/1f00074000.i2c/i2c-1/1-0068/iio:device0E: SUBSYSTEM=iioE: DEVNAME=/dev/iio:device0E: DEVTYPE=iio_deviceE: OF_NAME=mpu9250E: OF_FULLNAME=/axi/pcie@1000120000/rp1/i2c@74000/mpu9250@68E: OF_COMPATIBLE_0=invensense,mpu9250E: OF_COMPATIBLE_N=1E: MAJOR=509E: MINOR=0E: USEC_INITIALIZED=2915784E: IIO_SENSOR_PROXY_TYPE=iio-poll-accel iio-buffer-accelE: SYSTEMD_WANTS=iio-sensor-proxy.serviceE: TAGS=:systemd:E: CURRENT_TAGS=:systemd:
4. checking it by 'monitor-sensor' gives reasonable outputs as

Code:

pi@newpi5:~ $ monitor-sensor    Waiting for iio-sensor-proxy to appear+++ iio-sensor-proxy appeared=== Has accelerometer (orientation: normal)=== No ambient light sensor=== No proximity sensor    Accelerometer orientation changed: left-up    Accelerometer orientation changed: normal    Accelerometer orientation changed: right-up    Accelerometer orientation changed: normal    Accelerometer orientation changed: bottom-up    Accelerometer orientation changed: normal    Accelerometer orientation changed: left-up    Accelerometer orientation changed: normal    Accelerometer orientation changed: left-up    Accelerometer orientation changed: normal    Accelerometer orientation changed: right-up    Accelerometer orientation changed: normal    Accelerometer orientation changed: left-up    Accelerometer orientation changed: normal
Now the open question is: what detail is missing to make the screen rotate accordingly? Shouldn't that just happen because of ''iio-sensor-proxy' udev rule ''80-iio-sensor-proxy.rules?
Or is such feature simply not supported (or not enabled) in labwc?

Statistics: Posted by aBUGSworstnightmare — Thu Apr 17, 2025 2:53 pm



Viewing all articles
Browse latest Browse all 8374

Trending Articles