I have a LILYGO® TTGO T-Beam V1.1 and a Heltec Wifi Lora 32 board and two gy-86 modules. The software is the current 4.9.0 version. On both systems the calibration process hangs at the last step - this is endlessly requested again. I have already cross-swapped the two GY-86 modules.
I have tried to analyse the problem. I reloaded the software after deleting the flash:
esptool.py -p /dev/ttyUSB0 erase_flash
esptool.py -p /dev/ttyUSB0 write_flash 0x1000 bootloader_dio_40m.bin 0x8000 partitions.bin 0xe000 boot_app0.bin 0x10000 firmware_v4.9.0_psRam.bin 0x3d0000 spiffs_v4.9.0.bin
The sensor is found when booting:
Terminal bootlog /dev/ttyUSB0:
...
[I][main.cpp:536] oledPowerOn(): Heltec-board
[I][main.cpp:2487] taskBaro(): starting baro-task
[I][main.cpp:3663] taskStandard(): GPS Baud=9600,8N1,RX=12,TX=15
[I][main.cpp:4329] taskEInk(): stop task
[I][Baro.cpp:409] initMS5611(): found sensor MS5611
[I][Baro.cpp:423] initMS5611(): MPU6050 connection successful
[E][Preferences.cpp:492] getBytesLength(): nvs_get_blob len fail: axScale NOT_FOUND
[E][Preferences.cpp:492] getBytesLength(): nvs_get_blob len fail: ayScale NOT_FOUND
[E][Preferences.cpp:492] getBytesLength(): nvs_get_blob len fail: azScale NOT_FOUND
[I][Baro.cpp:447] initMS5611(): tempcorrection: t0=20.00 z0=0.00 t1=0.00 z1=0.00
[I][Baro.cpp:449] initMS5611(): Initializing DMP...
[I][Baro.cpp:457] initMS5611(): gyro not calibrated
[I][Baro.cpp:467] initMS5611(): acc offsets ax_offset=-332,ay_offset=1003,az_offset=1852
[I][Baro.cpp:482] initMS5611(): scale ax_scale=1.00,ay_scale=1.00,az_scale=1.00,
[I][Baro.cpp:483] initMS5611(): acc offsets ax_offset=0,ay_offset=0,az_offset=0
[I][Baro.cpp:484] initMS5611(): gyro offsets gx_offset=0,gy_offset=0,gz_offset=0
[I][Baro.cpp:537] calcClimbing(): Kalman_settings sigmaP=0.1000,sigmaA=0.6000
...
Under Settings "settings view" set to expert and "use accelerometer " to true(checked).
after reboot
Values are shown in the info area - sensor lies flat on the table:
accel -720,15030,17066
gyro x -1,-1,-1
acc z 1.90
If I then start the calibration under settings, the different orientations of the device/sensor are requested.
Terminal log /dev/ttyUSB0:
[I][WebHelper.cpp:49] onWebSocketEvent(): [0] Received text with size=11 paylod: {"page":10}
[I][WebHelper.cpp:59] onWebSocketEvent(): page=10
[I][WebHelper.cpp:486] onWebSocketEvent(): [0] type=10
[W][main.cpp:2528] taskBaro(): baro max=148ms
[I][WebHelper.cpp:49] onWebSocketEvent(): [0] Received text with size=14 paylod: {"calibAcc":1}
[I][WebHelper.cpp:49] onWebSocketEvent(): [0] Received text with size=15 paylod: {"calibAcc":11}
-765
14850
17080
-23
-23
-23
[I][WebHelper.cpp:49] onWebSocketEvent(): [0] Received text with size=15 paylod: {"calibAcc":11}
-1130
14497
-16076
-20
-20
-20
[I][WebHelper.cpp:49] onWebSocketEvent(): [0] Received text with size=15 paylod: {"calibAcc":11}
295
-1579
-20
-9
-9
-9
[I][WebHelper.cpp:49] onWebSocketEvent(): [0] Received text with size=15 paylod: {"calibAcc":11}
-85
31005
1150
-29
-29
-29
[I][Baro.cpp:139] calibrate(): ayMax=31005
[I][WebHelper.cpp:49] onWebSocketEvent(): [0] Received text with size=15 paylod: {"calibAcc":11}
-15999
14208
2302
-26
-26
-26
[I][WebHelper.cpp:49] onWebSocketEvent(): [0] Received text with size=15 paylod: {"calibAcc":11}
16769
14792
433
-23
-23
-23
[I][WebHelper.cpp:49] onWebSocketEvent(): [0] Received text with size=15 paylod: {"calibAcc":11}
16737
14821
1489
-23
-23
-23
The last step "please put module down" button "press when done" is requested endlessly.
I tried to understand the source code and got stuck in Baro.cpp line 128..153.
For me, both sensors are out of range - where do the values 5000 and 10000 come from?
meansensors();
if ((abs(mean_ax) <= 5000) && (abs(mean_ay) <= 5000) && (mean_az > 10000)){
azMax = mean_az;
log_i("azMax=%d",azMax);
}
if ((abs(mean_ax) <= 5000) && (abs(mean_ay) <= 5000) && (mean_az < -10000)){
azMin = mean_az;
log_i("azMin=%d",azMin);
}
if ((abs(mean_ax) <= 5000) && (mean_ay > 10000) && (abs(mean_az) <= 5000)){
ayMax = mean_ay;
log_i("ayMax=%d",ayMax);
}
if ((abs(mean_ax) <= 5000) && (mean_ay < -10000) && (abs(mean_az) <= 5000)){
ayMin = mean_ay;
log_i("ayMin=%d",ayMin);
}
if ((mean_ax > 10000) && (abs(mean_ay) <= 5000) && (abs(mean_az) <= 5000)){
axMax = mean_ax;
log_i("axMax=%d",axMax);
}
if ((mean_ax < -10000) && (abs(mean_ay) <= 5000) && (abs(mean_az) <= 5000)){
axMin = mean_ax;
log_i("axMin=%d",axMin);
}
if ((axMin != 0) && (axMax != 0) && (ayMin != 0) && (ayMax != 0) && (azMin != 0) && (azMax != 0)){
Change values - other ideas ?