Problems with the IMU examples

Hi, I want to read the imu values from the emlid, so I copied the AccelGyroMag.py script and start it, but I get an error?

reach:/home/Navio/Python$ python AccelGyroMag.py
ps: invalid option – ‘A’
BusyBox v1.22.1 (2015-10-23 15:54:36 MSK) multi-call binary.

Usage: ps

Traceback (most recent call last):
File “AccelGyroMag.py”, line 39, in
if imu.testConnection():
File “/home/Navio/Python/navio/mpu9250.py”, line 288, in testConnection
response = self.ReadReg(self.__MPUREG_WHOAMI)
File “/home/Navio/Python/navio/mpu9250.py”, line 263, in ReadReg
self.bus.open(self.spi_bus_number, self.spi_dev_number)
IOError: [Errno 2] No such file or directory

Does anyone know what I could have been doing wrong?
Thanks for help.

The code examples are for Navio, not for Reach. That is the reason why they do not work. In order to get access to the IMU you need to wait for a new firmware image that is coming out shortly. Current image does not have required driver patches to run IMU reliably.

1 Like

Oh ok thank you, but why is it possible to start the AccelGyroMag.cpp on the reach and get imu values and no error?

Pure luck :slight_smile: And thanks to Linux abstraction layers. Anyhow, we intend to add support and document IMU sampling, but currently this is completely accidental that it works.

Ok thank you! :slight_smile:

3 posts were split to a new topic: Problem with IMU example

any news regarding this functionality ?