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
IMU on i2c bus 4
#1
I have a hifiberry amp+ used to listen to audio through a Pi3 running openplotter. This means the i2c bus 1 on pins 3 & 5 are unavailable for any other i2c devices.
Code:
pi@openplotter:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
I`ve set up another bus, 4, and wired an imu 20948 to separate pins which seems to be working
Code:
pi@openplotter:~ $ i2cdetect -y 4
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Is it possible to get pypilot to use i2c bus 4 instead of bus 1? Had a very brief look at the code but nothing leapt out.

Thnx!
Reply
#2
The setting is in the RTIMULib.ini file. Look at boatimu.py and search for SETTINGS_FILE

This file is generated automatically if not found (in the directory where you launched pypilot).
Reply
#3
(2023-07-26, 07:08 PM)stelian Wrote: The setting is in the RTIMULib.ini file. Look at boatimu.py and search for SETTINGS_FILE

This file is generated automatically if not found (in the directory where you launched pypilot).

Thnx. Think I might have found it in here. Doesn't work though. I really should give up now before I break something ? >

[Image: F0Gn1do.png]
Reply
#4
You can of course modify the RTIMUlib code, hardcode the i2c bus number and rebuild. But it's the hard path.

Modifying the ini file is way simpler and should work. Do you have any pypilot startup logs ?
Reply
#5
(2023-07-27, 10:17 AM)stelian Wrote: You can of course modify the RTIMUlib code, hardcode the i2c bus number and rebuild. But it's the hard path.

Modifying the ini file is way simpler and should work. Do you have any pypilot startup logs ?

I`ve actually given up that route with the Pi3, the hifiberry amp+ uses a load of pins & with a lot of google isn't easy to get other things to play nicely so won't go any further that way. Which is not really a problem, it's a Pi3 running 24/7 doing lots of logging & playing music & various useful stuff but the main nav computer underway will be a Pi4 just running underway so will connect the IMU direct to that, seems more sensible anyway. I've a nasa nmea compass connected to the Pi3 so can keep an eye on the boat in the anchorage & get true wind logged underway from that. Thanx for help though ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)