SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By jku
#179317
I just received my 9 Degrees of Freedom block for Edison, and haven't been able to find any documentation on how the sensors are supported in linux and where the data is made available. I've also not found anything in the obvious places (/proc/bus/input/devices, /sys/devices/platform, dmesg).

Am I missing something obvious?
By sreen999
#179742
jku wrote:...and link to my own implementation, in case someone is interested: https://github.com/jku/LSM9DS0 (just hacks so far)
Hello jku,

When I compile your program with gcc on Edison, I get these errors:
root@ed:~/lsm9# gcc test.c
/tmp/ccWeq7JC.o: In function `calculate_simple_angles':
test.c:(.text+0x421c): undefined reference to `atan'
test.c:(.text+0x4257): undefined reference to `atan'
test.c:(.text+0x42b5): undefined reference to `sqrt'
test.c:(.text+0x42cb): undefined reference to `atan2'
test.c:(.text+0x42f1): undefined reference to `sqrt'
test.c:(.text+0x4307): undefined reference to `atan2'
collect2: error: ld returned 1 exit status

How should I compile it?

Your help is appreciated.
Thanks!
By jku
#179825
Oh sorry, didn't notice your message: I don't seem to get email notifications from this forum...

I've added a Makefile so if you pull now, "make" should work. It compiles fine even on the Edison itself. You should now get three binaries (the test app and a couple of calibration utilities -- see README for instructions).

I have to warn that the flight dynamics stuff (yaw, pitch, roll) is probably currently not correct. I've been concentrating on the calibration so far as at least my sensors don't give out sensible data without calibration. I'm looking at the flight angles in the next days: first I'll see about fixing the current simple angle functions and then get the Madgwick algorithm in use.