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
ICM-20948 (QWIIC) setup or standard i2c
#21
(2022-01-23, 06:13 PM)seandepagnier Wrote: The translations are automatic but I did recently have some german contributions, see:
https://github.com/pypilot/pypilot/blob/...essages.po

It maybe already better but if you see any terms there that should be changed, open a github issue or make a pull request, or email me and I will improve the translation.

The icm20948 seem to have better quality but I did receive some bad ones.   Now the price has doubled (again) though, so the price is 4 times from a year ago.
Hi Sean,

thank you for your support! I've opened an issue for a translation to german. Do you have a hint, where I can switch my webinterfaces back to english?
Reply
#22
Changing the browser language should make it english after you clear cache.. Should I make an option to set the language specifically for the web interface somewhere in the interface?
Reply
#23
how is generated RTIMULib.ini / RTIMULibTemp.ini to be used by openplotterPypilot or pypilot_boatimu?
I need to put some non default values in and I see it is always created default...

ps.
I think 
orangepi@orangepi5:~$ pwd
/home/orangepi
orangepi@orangepi5:~$ ls -ltr RTIMULib.ini
-rw-rw-r-- 1 orangepi orangepi 15101 mar 29 14:05 RTIMULib.ini

is used by pypilot_boatimu started manually:

orangepi@orangepi5:~$ pypilot_boatimu
imu process 2014
pypilotServer process 2016
server setup has 3 pipes
wykonane imu proces w czasie rzeczywistym
Korzystanie z pliku ustawień RTIMULib.ini
Settings file RTIMULib.ini loaded
Detected ICM20948 at standard address
Using fusion algorithm Kalman STATE4
IMU Name: ICM-20948
min/max compass calibration not in use
Using ellipsoid compass calibration
Using accel calibration
zeroconf addresses ['127.0.0.1', '192.168.8.120'] 2
ICM-20948 init complete
ustawienie początkowego odchylenia żyroskopu [-0.588, -0.403, -0.023]283629
stawka imu ustawiona na stawkę 20
zeroconf exception: 5028 roll 168.0318854080799 heading 102.46640006272229
kalibracja załadowana, start 201392784651440795 heading 99.74233852523841
^CProcess Process-3:088 roll 167.88251065344085 heading 99.97089774537334

but if I go to different folder and try to start

orangepi@orangepi5:~/work$ pypilot_boatimu
imu process 2196
pypilotServer process 2198
server setup has 3 pipes
wykonane imu proces w czasie rzeczywistym
Korzystanie z pliku ustawień RTIMULib.ini
Settings file not found. Using defaults and creating settings file
Failed to open SPI bus 0, select 0
Using fusion algorithm Kalman STATE4
BŁĄD: Nie wykryto IMU 504.811615282
zeroconf addresses ['127.0.0.1', '192.168.8.120'] 2
stawka imu ustawiona na stawkę 20
ustawienie początkowego odchylenia żyroskopu [-0.588, -0.403, -0.023]
stawka imu ustawiona na stawkę 20

no settings found -> creation of new settings file with default values Sad

but if I change config file location in boatimu.py (for example "general" in /usr/local/lib/python3.10/dist-packages/pypilot/RTIMULib.ini)
with 
55        SETTINGS_FILE = "/usr/local/lib/python3.10/dist-packages/pypilot/RTIMULib"

it works any location and any user Smile

root@orangepi5:/tmp# pypilot_boatimu
imu process 2384
pypilotServer process 2386
failed to load pypilot.conf [Errno 2] No such file or directory: '/root/.pypilot/pypilot.conf'
backup data failed as well [Errno 2] No such file or directory: '/root/.pypilot/pypilot.conf.bak'
server setup has 3 pipes
made imu process realtime
Using settings file /usr/local/lib/python3.10/dist-packages/pypilot/RTIMULib.ini
Settings file /usr/local/lib/python3.10/dist-packages/pypilot/RTIMULib.ini loaded
Detected ICM20948 at standard address
Using fusion algorithm Kalman STATE4
IMU Name: ICM-20948
min/max compass calibration not in use
Using ellipsoid compass calibration
Using accel calibration
zeroconf addresses ['127.0.0.1', '192.168.8.120'] 2
ICM-20948 init complete
imu rate set to rate 208 roll 168.08898910115389 heading 100.03160914381563
zeroconf exception: 3097 roll 167.69941282813272 heading 100.17036512314208
^CProcess Process-3:0603 roll 167.2410948896507 heading 99.89425885391276
Reply
#24
the first obvious difference is you are using orange pi not raspberry pi?

I think this maybe the reason, but anyway, what are the non-default values you need to put in?

If you edit the file is it overwritten or?
Reply
#25
the first obvious difference is you are using orange pi not raspberry pi?
-> this is not big deal to adopt to OPI5 Smile I can send you what I did it to work on orange pi 5 Smile

I think this maybe the reason, but anyway, what are the non-default values you need to put in?
-> I2CBUS=5 in my case makes difference (i2cdetect -y 5), default value is 1 (i2detect -y 1) as init file is created in diffrent places (depends on user started and folder from) ini file is always default in use. When I forced pypilot to use only one location in boatimu.py problem is solved Smile

If you edit the file is it overwritten or?
-> once edited to set I2CBus=5 that's all Smile --> corrected, also it is overwritten with  IMUType=14 (as I have IMU-20948)
Reply
#26
So as long as you run pypilot from the same folder it works after editing the file?

Are you really using icm20948 over SPI bus?    I wrote the icm20948 driver and never used it with anything besides i2c.

It is impractical to probe all spi busses including spi bus 5 without some kind of hint, normally I put an eeprom on the gpio header which creates a config file available on:
/proc/device-tree/hat/custom_0

Code:
{"mpu":{"driver":"icm20948",
        "port":"/dev/i2c-1"},
"lcd":{"driver":"jlx12864",
        "port":"/dev/spidev0.0"},
"arduino":{"device":"/dev/spidev0.1",
            "resetpin":26,
            "hardware":0.35}
}

Currently it autodetects the mpu ignoring this hint but this is where it would be expanded from to specify spi bus 5.   This way if you had a board for orange pi, it would have the eeprom programmed to specify that hardware setup, eventually even which gpio pins to use for keys if any.

the lcd and arduino hints are already used.
Reply
#27
sorry my bad!
I was thinking about I2CBus=5 but I wrote SpiBus=5 (corrected above) Smile
Indeed it works on I2C as mentioned i2cdetect -y 5 (0x68) and detects IMU-20948 (SEN-15335)


So as long as you run pypilot from the same folder it works after editing the file?
-> now it doesnt' matter Smile as I set SETTINGS_FILE = "/usr/local/lib/python3.10/dist-packages/pypilot/RTIMULib" in ../pypilot/boatimu.py I can run it from anyplace and it always refer to
/usr/local/lib/python3.10/dist-packages/pypilot/RTIMULib.ini where it is set  I2CBus=5 and also after have detected IMU it updates that config file to IMUType=14 Smile
Reply
#28
I put my notes in Openplotter/How do I thread...?/Openplotter on OrangePI 5
Appreciated for your opinion Smile
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)