
On Thu, Feb 19, 2015 at 01:32:49PM +1300, Lawrence D'Oliveiro wrote:
On Thu, 19 Feb 2015 12:40:15 +1300, Michael Cree wrote:
I have been trying to interface an IMU (inertial measurement unit) to the beaglebone black with the hope of getting a flight controller for multirotor drone running on it. It's currently pretty low-level stuff includying writing kernel code, cross-compiling kernels, and trying to understand and use from user space the IIO (industrial instrument I/O) interface of the kernel.
Programming always interests me, particularly the mechanisms in Linux to do low-level stuff from userland, _without_ having to resort to kernel programming.
Is there a libiio, analogous to libusb, for this purpose?
Unforunately there does not appear to be. The IIO subsystem seems to be poorly documented, at least for user side access, and particularly poorly documented for use of triggers to get repeated measurements. Access is via sysfs (for configuring and one-time reads) and via dev nodes for triggered measurements into a buffer. I have the basics going but am really struggling to get triggered I/O going. I suspect I have to make a device tree blob entry for the boot process so that the kernel makes a link from a timer to the IIO trigger ... I am finding I have to get deeper and deeper into this with very little guidance/instruction on the web about it and ending up having to read kernel source code to work out how the hell to drive it. I was hoping to get first hand advice at LCA2015 from developers but unfortunately I had to abandon LCA2015 after the first day due to a death in the family. But I suspect if I can sort it out and write up something --- or even end up writing up a libiio --- that would be very beneficial to the community. Cheers Michael