Is MinIMU-9 v5 supported on ESP32

Ive tried to upload code for Heltec ESP32 LoRa V2 but it wont compile making me think the module is not supported with ESP32 controller?

if it is not supported by ESP32, will the V3 run on ESP32?

Hello.

I am not sure what programs you are trying to upload to your board, but if you are using our LSM6 library for Arduino or our LIS3MDL library for Arduino, those should support most Arduino-compatible boards. Could you tell me what version of the Arduino IDE you are using (or if you are using a different compiler) and clarify what programs you are trying to upload?

If you have not already, I recommend enabling the verbose output option in Arduino IDE so you can get a better idea of what is going on. If you do that and still cannot make sense of the error message, can you post the message here?

- Patrick

Latest release Arduino, fresh install.

I try to add this file and it saya file is not compatible

Can you post a screenshot of the error message?

The program you linked requires the LSM6 and LIS3MDL libraries I mentioned in my previous post to work. Can you confirm that you installed those?

- Patrick

Have you resolved it?

No, i removed Arduino IDE and all libraries due to continued conflicts with the Heltec board. After fresh install, the problem still persists. I do have the two libraries installed. The program will not go into my library. Still says incompatable. I didnt get a chance to Copy the error message yet.

The library still wont load if i tey to use include library/zip file. I unzipped the file and coppied it to the library file ut the IDE doesnt add it.

I opened the main .ino in from the folder and was able to load the file but with with the mi IMU V2 commented out. I uncommitted it and teied to load and got the errors i have attached.
minimu error.txt (13.1 KB)

// LIS3MDL - Version: Latest 
#include <LIS3MDL.h>

// LSM6 - Version: Latest 
#include <LSM6.h>

/*

MinIMU-9-Arduino-AHRS
Pololu MinIMU-9 + Arduino AHRS (Attitude and Heading Reference System)

Copyright (c) 2011-2016 Pololu Corporation.
http://www.pololu.com/

MinIMU-9-Arduino-AHRS is based on sf9domahrs by Doug Weibel and Jose Julio:
http://code.google.com/p/sf9domahrs/

sf9domahrs is based on ArduIMU v1.5 by Jordi Munoz and William Premerlani, Jose
Julio and Doug Weibel:
http://code.google.com/p/ardu-imu/

MinIMU-9-Arduino-AHRS is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.

MinIMU-9-Arduino-AHRS is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
more details.

You should have received a copy of the GNU Lesser General Public License along
with MinIMU-9-Arduino-AHRS. If not, see <http://www.gnu.org/licenses/>.

*/

// Uncomment the following line to use a MinIMU-9 v5 or AltIMU-10 v5. Leave commented for older IMUs (up through v4).
#define IMU_V5

// Uncomment the below line to use this axis definition:
   // X axis pointing forward
   // Y axis pointing to the right
   // and Z axis pointing down.
// Positive pitch : nose up
// Positive roll : right wing dowIn
// Positive yaw : clockwise
int SENSOR_SIGN[9] = {1,1,1,-1,-1,-1,1,1,1}; //Correct directions x,y,z - gyro, accelerometer, magnetometer
// Uncomment the below line to use this axis definition:
   // X axis pointing forward
   // Y axis pointing to the left
   // and Z axis pointing up.
// Positive pitch : nose down
// Positive roll : right wing down
// Positive yaw : counterclockwise
//int SENSOR_SIGN[9] = {1,-1,-1,-1,1,1,1,-1,-1}; //Correct directions x,y,z - gyro, accelerometer, magnetometer

// tested with Arduino Uno with ATmega328 and Arduino Duemilanove with ATMega168

#include <Wire.h>

// accelerometer: 8 g sensitivity
// 3.9 mg/digit; 1 g = 256
#define GRAVITY 256  //this equivalent to 1G in the raw data coming from the accelerometer

#define ToRad(x) ((x)*0.01745329252)  // *pi/180
#define ToDeg(x) ((x)*57.2957795131)  // *180/pi

// gyro: 2000 dps full scale
// 70 mdps/digit; 1 dps = 0.07
#define Gyro_Gain_X 0.07 //X axis Gyro gain
#define Gyro_Gain_Y 0.07 //Y axis Gyro gain
#define Gyro_Gain_Z 0.07 //Z axis Gyro gain
#define Gyro_Scaled_X(x) ((x)*ToRad(Gyro_Gain_X)) //Return the scaled ADC raw data of the gyro in radians for second
#define Gyro_Scaled_Y(x) ((x)*ToRad(Gyro_Gain_Y)) //Return the scaled ADC raw data of the gyro in radians for second
#define Gyro_Scaled_Z(x) ((x)*ToRad(Gyro_Gain_Z)) //Return the scaled ADC raw data of the gyro in radians for second

// LSM303/LIS3MDL magnetometer calibration constants; use the Calibrate example from
// the Pololu LSM303 or LIS3MDL library to find the right values for your board

#define M_X_MIN -1000
#define M_Y_MIN -1000
#define M_Z_MIN -1000
#define M_X_MAX +1000
#define M_Y_MAX +1000
#define M_Z_MAX +1000

#define Kp_ROLLPITCH 0.02
#define Ki_ROLLPITCH 0.00002
#define Kp_YAW 1.2
#define Ki_YAW 0.00002

/*For debugging purposes*/
//OUTPUTMODE=1 will print the corrected data,
//OUTPUTMODE=0 will print uncorrected data of the gyros (with drift)
#define OUTPUTMODE 1

#define PRINT_DCM 0     //Will print the whole direction cosine matrix
#define PRINT_ANALOGS 0 //Will print the analog raw data
#define PRINT_EULER 1   //Will print the Euler angles Roll, Pitch and Yaw

#define STATUS_LED 13

float G_Dt=0.02;    // Integration time (DCM algorithm)  We will run the integration loop at 50Hz if possible

long timer=0;   //general purpuse timer
long timer_old;
long timer24=0; //Second timer used to print values
int AN[6]; //array that stores the gyro and accelerometer data
int AN_OFFSET[6]={0,0,0,0,0,0}; //Array that stores the Offset of the sensors

int gyro_x;
int gyro_y;
int gyro_z;
int accel_x;
int accel_y;
int accel_z;
int magnetom_x;
int magnetom_y;
int magnetom_z;
float c_magnetom_x;
float c_magnetom_y;
float c_magnetom_z;
float MAG_Heading;

float Accel_Vector[3]= {0,0,0}; //Store the acceleration in a vector
float Gyro_Vector[3]= {0,0,0};//Store the gyros turn rate in a vector
float Omega_Vector[3]= {0,0,0}; //Corrected Gyro_Vector data
float Omega_P[3]= {0,0,0};//Omega Proportional correction
float Omega_I[3]= {0,0,0};//Omega Integrator
float Omega[3]= {0,0,0};

// Euler angles
float roll;
float pitch;
float yaw;

float errorRollPitch[3]= {0,0,0};
float errorYaw[3]= {0,0,0};

unsigned int counter=0;
byte gyro_sat=0;

float DCM_Matrix[3][3]= {
  {
    1,0,0  }
  ,{
    0,1,0  }
  ,{
    0,0,1  }
};
float Update_Matrix[3][3]={{0,1,2},{3,4,5},{6,7,8}}; //Gyros here


float Temporary_Matrix[3][3]={
  {
    0,0,0  }
  ,{
    0,0,0  }
  ,{
    0,0,0  }
};

void setup()
{
  Serial.begin(115200);
  pinMode (STATUS_LED,OUTPUT);  // Status LED

  I2C_Init();

  Serial.println("Pololu MinIMU-9 + Arduino AHRS");

  digitalWrite(STATUS_LED,LOW);
  delay(1500);

  Accel_Init();
  Compass_Init();
  Gyro_Init();

  delay(20);

  for(int i=0;i<32;i++)    // We take some readings...
    {
    Read_Gyro();
    Read_Accel();
    for(int y=0; y<6; y++)   // Cumulate values
      AN_OFFSET[y] += AN[y];
    delay(20);
    }

  for(int y=0; y<6; y++)
    AN_OFFSET[y] = AN_OFFSET[y]/32;

  AN_OFFSET[5]-=GRAVITY*SENSOR_SIGN[5];

  //Serial.println("Offset:");
  for(int y=0; y<6; y++)
    Serial.println(AN_OFFSET[y]);

  delay(2000);
  digitalWrite(STATUS_LED,HIGH);

  timer=millis();
  delay(20);
  counter=0;
}

void loop() //Main Loop
{
  if((millis()-timer)>=20)  // Main loop runs at 50Hz
  {
    counter++;
    timer_old = timer;
    timer=millis();
    if (timer>timer_old)
    {
      G_Dt = (timer-timer_old)/1000.0;    // Real time of loop run. We use this on the DCM algorithm (gyro integration time)
      if (G_Dt > 0.2)
        G_Dt = 0; // ignore integration times over 200 ms
    }
    else
      G_Dt = 0;



    // *** DCM algorithm
    // Data adquisition
    Read_Gyro();   // This read gyro data
    Read_Accel();     // Read I2C accelerometer

    if (counter > 5)  // Read compass data at 10Hz... (5 loop runs)
    {
      counter=0;
      Read_Compass();    // Read I2C magnetometer
      Compass_Heading(); // Calculate magnetic heading
    }

    // Calculations...
    Matrix_update();
    Normalize();
    Drift_correction();
    Euler_angles();
    // ***

    printdata();
  }

}


Here is the code with #define IMU_V5 uncommented. If I choose an Arduino board it compiles successfully. but if i put hardware to my board, Heltec LoRa32 V2, i get the following errors.

/usr/local/bin/arduino-cli compile --fqbn esp32:esp32:heltec_wifi_lora_32_V2:CPUFreq=240,DebugLevel=none,LORAWAN_REGION=0,LoRaWanDebugLevel=0,PSRAM=disabled,UploadSpeed=921600 --libraries /home/builder/opt/libraries/latest --build-cache-path /tmp --output-dir /tmp/340727716/build --build-path /tmp/arduino-build-537F995FA4B8D6B45A11259327A98036 --library /mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LIS3MDL --library /mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6 /tmp/340727716/MinIMU9AHRS_copy

Using library LSM6 at version 2.0.0 in folder: /mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6

Using library Wire at version 2.0.0 in folder: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/libraries/Wire

In file included from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/soc/include/soc/gpio_periph.h:17,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/hal/include/hal/gpio_types.h:17,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/esp_hw_support/include/esp_sleep.h:13,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/cores/esp32/esp32-hal.h:33,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/cores/esp32/Arduino.h:36,

from /tmp/arduino-build-537F995FA4B8D6B45A11259327A98036/sketch/MinIMU9AHRS_copy.ino.cpp:1:

/home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/soc/esp32/include/soc/io_mux_reg.h:102:43: error: expected identifier before ‘(’ token

#define PIN_CTRL (DR_REG_IO_MUX_BASE +0x00)

^

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:22:7: note: in expansion of macro ‘PIN_CTRL’

PIN_CTRL = 0x02, // DSO

^~~~~~~~

/home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/soc/esp32/include/soc/io_mux_reg.h:102:43: error: expected ‘}’ before ‘(’ token

#define PIN_CTRL (DR_REG_IO_MUX_BASE +0x00)

^

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:22:7: note: in expansion of macro ‘PIN_CTRL’

PIN_CTRL = 0x02, // DSO

^~~~~~~~

In file included from /tmp/340727716/MinIMU9AHRS_copy/MinIMU9AHRS_copy.ino:5:

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:20:5: note: to match this ‘{’

{

^

In file included from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/soc/include/soc/soc_memory_types.h:20,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/esp_hw_support/include/soc/compare_set.h:12,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h:13,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/portmacro.h:42,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/freertos/include/freertos/portable.h:51,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/freertos/include/freertos/FreeRTOS.h:63,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/cores/esp32/Arduino.h:33,

from /tmp/arduino-build-537F995FA4B8D6B45A11259327A98036/sketch/MinIMU9AHRS_copy.ino.cpp:1:

/home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:50:49: error: expected unqualified-id before numeric constant

#define DR_REG_IO_MUX_BASE 0x3ff49000

^~~~~~~~~~

/home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/soc/esp32/include/soc/io_mux_reg.h:102:44: note: in expansion of macro ‘DR_REG_IO_MUX_BASE’

#define PIN_CTRL (DR_REG_IO_MUX_BASE +0x00)

^~~~~~~~~~~~~~~~~~

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:22:7: note: in expansion of macro ‘PIN_CTRL’

PIN_CTRL = 0x02, // DSO

^~~~~~~~

/home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:50:49: error: expected ‘)’ before numeric constant

#define DR_REG_IO_MUX_BASE 0x3ff49000

^~~~~~~~~~

/home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/soc/esp32/include/soc/io_mux_reg.h:102:44: note: in expansion of macro ‘DR_REG_IO_MUX_BASE’

#define PIN_CTRL (DR_REG_IO_MUX_BASE +0x00)

^~~~~~~~~~~~~~~~~~

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:22:7: note: in expansion of macro ‘PIN_CTRL’

PIN_CTRL = 0x02, // DSO

^~~~~~~~

In file included from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/soc/include/soc/gpio_periph.h:17,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/hal/include/hal/gpio_types.h:17,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/esp_hw_support/include/esp_sleep.h:13,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/cores/esp32/esp32-hal.h:33,

from /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/cores/esp32/Arduino.h:36,

from /tmp/arduino-build-537F995FA4B8D6B45A11259327A98036/sketch/MinIMU9AHRS_copy.ino.cpp:1:

/home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/include/soc/esp32/include/soc/io_mux_reg.h:102:43: note: to match this ‘(’

#define PIN_CTRL (DR_REG_IO_MUX_BASE +0x00)

^

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:22:7: note: in expansion of macro ‘PIN_CTRL’

PIN_CTRL = 0x02, // DSO

^~~~~~~~

In file included from /tmp/340727716/MinIMU9AHRS_copy/MinIMU9AHRS_copy.ino:5:

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:272:5: error: ‘vector’ does not name a type; did you mean ‘wctob’?

vector<int16_t> a; // accelerometer readings

^~~~~~

wctob

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:273:5: error: ‘vector’ does not name a type; did you mean ‘wctob’?

vector<int16_t> g; // gyro readings

^~~~~~

wctob

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:277:10: error: expected unqualified-id before ‘)’ token

LSM6();

^

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h: In function ‘void setBus(TwoWire*)’:

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:279:34: error: invalid use of ‘this’ in non-member function

void setBus(TwoWire * bus) { this->bus = bus; }

^~~~

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h: In function ‘TwoWire* getBus()’:

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:280:33: error: ‘bus’ was not declared in this scope

TwoWire * getBus() { return bus; }

^~~

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h: At global scope:

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:282:15: error: ‘bool init’ redeclared as different kind of symbol

bool init(deviceType device = device_auto, sa0State sa0 = sa0_auto);

^~~~~~~~~~

In file included from /tmp/arduino-build-537F995FA4B8D6B45A11259327A98036/sketch/MinIMU9AHRS_copy.ino.cpp:1:

/home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.4/cores/esp32/Arduino.h:148:6: note: previous declaration ‘void init()’

void init(void);

^~~~

In file included from /tmp/340727716/MinIMU9AHRS_copy/MinIMU9AHRS_copy.ino:5:

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:282:15: error: ‘deviceType’ was not declared in this scope

bool init(deviceType device = device_auto, sa0State sa0 = sa0_auto);

^~~~~~~~~~

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:282:15: note: suggested alternative: ‘decltype’

bool init(deviceType device = device_auto, sa0State sa0 = sa0_auto);

^~~~~~~~~~

decltype

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:282:48: error: ‘sa0State’ was not declared in this scope

bool init(deviceType device = device_auto, sa0State sa0 = sa0_auto);

^~~~~~~~

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:282:48: note: suggested alternative: ‘setstate’

bool init(deviceType device = device_auto, sa0State sa0 = sa0_auto);

^~~~~~~~

setstate

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:283:5: error: ‘deviceType’ does not name a type; did you mean ‘decltype’?

deviceType getDeviceType() { return _device; }

^~~~~~~~~~

decltype

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:295:85: error: ‘vector’ does not name a type; did you mean ‘wctob’?

template <typename Ta, typename Tb, typename To> static void vector_cross(const vector *a, const vector *b, vector *out);

^~~~~~

wctob

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:295:91: error: expected ‘,’ or ‘…’ before ‘<’ token

template <typename Ta, typename Tb, typename To> static void vector_cross(const vector *a, const vector *b, vector *out);

^

In file included from /tmp/340727716/MinIMU9AHRS_copy/MinIMU9AHRS_copy.ino:5:

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:296:71: error: ‘vector’ does not name a type; did you mean ‘wctob’?

template <typename Ta, typename Tb> static float vector_dot(const vector *a, const vector *b);

^~~~~~

wctob

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:296:77: error: expected ‘,’ or ‘…’ before ‘<’ token

template <typename Ta, typename Tb> static float vector_dot(const vector *a, const vector *b);

^

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:297:34: error: variable or field ‘vector_normalize’ declared void

static void vector_normalize(vector *a);

^~~~~~

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:297:34: error: ‘vector’ was not declared in this scope

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:297:34: note: suggested alternative: ‘wctob’

static void vector_normalize(vector *a);

^~~~~~

wctob

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:297:41: error: expected primary-expression before ‘float’

static void vector_normalize(vector *a);

^~~~~

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:299:3: error: expected unqualified-id before ‘private’

private:

^~~~~~~

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:301:5: error: ‘deviceType’ does not name a type; did you mean ‘decltype’?

deviceType _device; // chip type

^~~~~~~~~~

decltype

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:304:38: error: ‘regAddr’ has not been declared

int16_t testReg(uint8_t address, regAddr reg);

^~~~~~~

/mnt/create-efs/webide/04/2a/042a04e1ec3d0f882e947ef0666c8efb:warriorridersumrell/libraries_v2/LSM6/LSM6.h:305:1: error: expected declaration before ‘}’ token

};

^

Error during build: exit status 1

It looks like one of the pins defined for your board is conflicting with one of the registers defined by the LSM6 library. We will work on updating the library to change that.

- Patrick

Hi, a1bucker.

We’ve released a new version of the LSM6 library (2.0.1) which should work around this issue on the ESP32. Could you try updating to the latest version and see if it works for you?

Kevin

That did it. Its running thank you.

In a quick test run roll and pitch look very good but yaw wasnt right. It would read up to 179.9 and switch to -179.9 which i know is correct but in turning towards 0 at about 125 it goes nuts and starts counting numbers. It wont go below 125ish.

Ill spend some more time with it later to rule out and metal or magnetic affects of where i was working.

1 Like

Hello, i am facing the same problem with the yaw, have you managed to solve it, also my pitch and roll reading are missed up