How can I take readings from the gyroscope and accelerometer?
#3
(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
  Reply


Messages In This Thread
RE: How can I take readings from the gyroscope and accelerometer? - by Trbl - 04-01-2021, 10:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Article: Inside a Smartphone Accelerometer: PinePhone with NuttX RTOS lupyuen 22 11,494 05-28-2023, 06:09 AM
Last Post: lupyuen

Forum Jump:


Users browsing this thread: 1 Guest(s)