ICM20948_DMP_Arduino icon indicating copy to clipboard operation
ICM20948_DMP_Arduino copied to clipboard

Compile error - what is the proper directory structure?

Open molecule opened this issue 4 years ago • 1 comments

I've tried the following directory arrangements:

  1. ICM20948 folder and 20948_Working folder both inside Arduino --> libraries folder.
  2. ICM20948 folder and 20948_Working folder both inside Arduino-->libraries -->ICM20948_DMP_Arduino

Both have the same error, captured below. What is the proper directory structure?

Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Nano, ATmega328P"

20948_Working:2:10: fatal error: Icm20948.h: No such file or directory

#include <Icm20948.h>

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

compilation terminated.

exit status 1

Icm20948.h: No such file or directory

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

molecule avatar Aug 05 '20 22:08 molecule

I was able to get past the above compile-time error by placing all of the files inside ICM20948 inside the 20948_Working folder (see image):

image

I also changed the "includes" to have quotations instead of angle brackets:

#include "Icm20948.h" #include "SensorTypes.h" #include "Icm20948MPUFifoControl.h"

I'd still like to know what the 'correct' version is.

molecule avatar Aug 05 '20 23:08 molecule