04-01-2021, 10:53 PM
(03-15-2021, 06:12 PM)kk22 Wrote: I would like to use my Pinephone in a project where I need to take gyroscope and accelerometer readings. I can't find any information on how to access these sensors though. I tried lm-sensors but it only displays battery status and thermal sensors. There doesn't seem to be any info on the wiki either about accessing these. How can I log readings from these sensors?
https://github.com/Alumniminium/PinePhon...rometer.cs
This might help. If you take a look at the Path variable, you'll see the 'Gyroscope` is at
"/sys/bus/i2c/devices/2-0068/iio:device2"
which contains files like "in_anglvel_x_raw"
you can 'cat' files to read and 'echo | sudo tee' to write