// set the fll scale range of the gyro- and accelerometer respectively
accelgyro.setFullScaleGyroRange(0); //0: 250deg/s | 1: 500deg/s | 2: 1000deg/s | 3: 2000deg/s
accelgyro.setFullScaleAccelRange(0); //0: 2g | 1: 4g | 2: 8g | 3: 16g
So since the offset values obtained are not in the expected range, they need to be adjusted.
from 1000dps to 250dps you go /4
from 8g to 2g you go /4 but the LSb is not part of the offset (it's stored on bit 1 to 15) so you need to get rid of that one too, so an extra shift right which is the same thing as dividing by 2 ➜ /4/2 <==> /8
Thank you! Frankly speaking, I didn't know about this doc
So if got right for my settings (+- 2000 deg/s I need to value * 2) and (+- 16g I need to (value >> 1) * 2 ), right ?
The offset You obtained with the script as it is (max sensitivity and divide by 4 and 8) are what you want to use in your real code irrespective of the future settings you choose.