PINE64
accelerometer / gyro programming - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Hardware (https://forum.pine64.org/forumdisplay.php?fid=122)
+--- Thread: accelerometer / gyro programming (/showthread.php?tid=11554)



accelerometer / gyro programming - jgullickson - 09-20-2020

I'm experimenting with writing some programs that use the accelerometer & gyro and I'm wondering if anyone here knows if there are "Unix-y" interfaces for these devices (/dev/something) or if they need to be accessed via some other mechanism like the SPI bus, etc.?

The programs I'm writing are in C but if you have an example in another language I might be able to translate.

Thank-you!


Jason


RE: accelerometer / gyro programming - wibble - 09-21-2020

They have kernel drivers and "Unix-y" interfaces - see for example:
https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)#Sensors

Note that the device number might not be consistent - on mobian the mpu6050 is on iio:device2