This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Second MPU-9250
#4
I think I have solved the problem in the meanwhile:
 
Pypilot is using RTIMULib2 (https://github.com/seandepagnier/RTIMULib2.git), where the i2c addresses of the MPU-9250 are defined in the header file RTIMUDefs.h.
 
So in order to change the priority in which pypilot accesses the two possible i2c addresses (0x68 and 0x69) you need to modify the RTMIDefs.h file before you re-build and reinstall the library:
 

Code:
git clone https://github.com/seandepagnier/RTIMULib2.git
          
- open the file RTIMULib/IMUDrivers/RTIMUDefs.h
- swap the two addresses (0x68 & 0x69) in the sections 'MPU925x I2C Slave Addresses' AND 'MPU9150 I2C Slave Addresses'
- save and close the file

Code:
cd RTIMULib2/Linux/python
sudo python3 setup.py build
sudo python3 setup.py install

Now pypiot accesses first the external IMU and if it does not find it (e.g. because it is disconnected) it uses the internal IMU from the Moitessier HAT.
 
Works flawlessly…
Reply


Messages In This Thread
Second MPU-9250 - by TomSailor - 2020-06-23, 08:57 PM
RE: Second MPU-9250 - by holgerw - 2020-06-24, 09:07 PM
RE: Second MPU-9250 - by TomSailor - 2020-06-30, 09:26 AM
RE: Second MPU-9250 - by TomSailor - 2020-07-07, 09:27 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)