mirror of
https://github.com/okalachev/flix.git
synced 2026-08-16 00:38:56 +00:00
Add instructions on how to set pin numbers for imu
This commit is contained in:
@@ -77,9 +77,26 @@ In case if using different IMU model than MPU9250, change `imu` variable declara
|
||||
|
||||
```cpp
|
||||
ICM20948 imu(SPI); // For ICM-20948
|
||||
// or
|
||||
MPU6050 imu(Wire); // For MPU-6050
|
||||
```
|
||||
|
||||
If using non-default SPI pins, pass SCK, MISO, and MOSI pin numbers to `SPI.begin` call and SS pin to `imu` constructor like that:
|
||||
|
||||
```cpp
|
||||
ICM20948(SPI, <SS>);
|
||||
// ...
|
||||
SPI.begin(<SCK>, <MISO>, <MOSI>);
|
||||
imu.begin();
|
||||
```
|
||||
|
||||
If using non-default I2C pins, pass SDA and SCL pin numbers to `Wire.setPins` call like that:
|
||||
|
||||
```cpp
|
||||
Wire.begin(<SDA>, <SCL>);
|
||||
imu.begin();
|
||||
```
|
||||
|
||||
### Connect using QGroundControl
|
||||
|
||||
QGroundControl is a ground control station software that can be used to monitor and control the drone.
|
||||
|
||||
Reference in New Issue
Block a user