Tinyu-Zhao / BMI270_Sensor

MIT License
2 stars 4 forks source link

Compilation error: 'I2C_IMU' does not name a type #1

Open BH2VSQ opened 1 year ago

BH2VSQ commented 1 year ago

I installed the package and open the example "IMU.ino". After I click the compilation, the software told me that 'I2C_IMU' does not name a type. So Whether I need to install a library to make the 'I2C_IMU' useable?

Tinyu-Zhao commented 1 year ago

I installed the package and open the example "IMU.ino". After I click the compilation, the software told me that 'I2C_IMU' does not name a type. So Whether I need to install a library to make the 'I2C_IMU' useable?

This library is externally referenced to M5CoreS3 and needs to be used in conjunction with it.

BH2VSQ commented 1 year ago

I added #include and set the module to ESP32S3 Dev Module. Then the compiltion works well. But I only have ESP32-C3 DEV Module from luat. As I set the Module to ESP32C3 Dev Module, the compiltion always failed with `In file included from C:\Users*\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5/tools/sdk/esp32c3/include/driver/include/driver/i2c.h:24, from c:\Users*\Documents\Arduino\libraries\M5CoreS3\src/utility/I2C_IMU.h:5, from c:\Users*\Documents\Arduino\libraries\M5CoreS3\src/M5CoreS3.h:16, from D:\Desktop\esp32c3\IMU\IMU.ino:1: C:\Users*\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5/tools/sdk/esp32c3/include/hal/include/hal/i2c_types.h:85:28: error: #if with no expression

if CONFIG_IDF_TARGET_ESP32

                        ^`

Are there any solutions to make it works on ESP32C3 Module?

Tinyu-Zhao commented 1 year ago

M5CoreS3 use esps3 chip..