I2c bus setup. Setting compass module

I don’t have a compass calibration, but it gives data when I bring a screwdriver. But I know that the compass sensor has a sensitivity setting. I don’t know how to do this; help is a problem for me. I am limited in means.
can use arduino, and configure, only I don’t know which command increases sensitivity

It is now possible to use PX4 without compass. @bresch should be able to point to the documentation.

can you help me with register programming? it’s important for me

I have many things that are important to me too and helping a random with register programming is not on the list, sorry.

Now, someone in this forum might be able to help you if you actually give some more information and context. E.g. what sensor are you talking about? What is the datasheet? And what register do you want to change?

By the way I don’t think you can just set a register so magnetic interference is “switched off”. A sensor measures and if you give it garbage like a screwdriver, it just won’t cope.

sensor qmc5883l .

And this is an excerpt from a datasheet

I meant it

#include <Wire.h> // подключаем I2C библиотеку
#define addr 0x0D // I2C 7-битный адрес датчика HMC5883

void setup() {
Serial.begin(9600); // инициализация последовательного порта
Wire.begin(); // инициализация I2C

// Задаём режим работы датчика HMC5883:
Wire.beginTransmission(addr);
Wire.write(0x00); // выбираем регистр управления CRA (00)
Wire.write(0x70); // записываем в него 0x70 [усреднение по 8 точкам, 15 Гц, нормальные измерения]
**Wire.write(0xA0); // write to the register CRB (01) 0xA0 [sensitivity = 5]**
Wire.write(0x00); // записываем в регистр Mode (02) 0x00 [бесконечный режим измерения]
Wire.endTransmission();

}

Yes, at this point you need to figure out what your Arduino code is doing and translate that to the PX4 driver. I can’t do this work for you, and you’re probably better at reading Russian than me :smile:.

ok, thanks, I will look for answers further