Pros::Imu not recognized

I have been trying to use the inertial sensor for the first time, but I can’t get the pros to recognize it. The upgrade tab says that I have the 3.3.0 kernel and 4.0.5 okapilib. According to the atom package manager, all of my packages are up to date as well.

I am using the declaration that the pros documentation says to use:

pros::Imu inertial_sensor(INERTIAL_SENSOR_PORT);

I keep getting the following error: “no type named ‘Imu’ in namespace ‘pros’”

It recognizes the constructor to every other piece of hardware that we have, but not that one.

Make sure the linter isn’t fooling you, and that your project compiles.
In this case, the linter does not know where the newly added imu file is.

1 Like

I agree that the linter is a little unreliable, unfortunately, that’s not the problem I’m having. The errors I reported came from the compiler after I told it to build.

I did another build all to check this morning, and it still won’t compile the files that reference the inertial sensor.

Did you include it in void initialize() { } ?
You have to initialize it and define it in another file like this
extern pros::IMU inertial1;

Please show a screenshot of your entire error when you try to compile.