Madgwick library doesn't work on arduino nano every

Hi!

I'm following this tutorial https://docs.arduino.cc/library-examples/curie-imu/Genuino101CurieIMUOrientationVisualiser#hardware-required but I am not able to upload compiled sketch to the board. Is my arduino nano every not compatible with Intel Curie Boards or did I miss something?

Starting download script...
Flashing is taking longer than expected
Try pressing MASTER_RESET button
ERROR: Timed out waiting for Arduino 101 on COM5
Failed uploading: uploading error: exit status 1

Welcome to the forum

Your topic title refers to an Arduino Nano Every but the error message refers to an Arduino 101

Which board do you have and which board do you have selected in the IDE ?

1 Like

I'm using Arduino Nano Every, but when I try to compile the code i get

Compilation error: CurieIMU.h: No such file or directory

When I selected Arduino 101 (which I don't have on me right now) in board menu the code is fine but won't upload. I guess this is because 101 and Nano Every are two seperate boards.

Those two boards have nothing in common, except for the manufacturer.

The Madgwick library needs to be configured separately, for different IMUs and often, for different processor boards. It is not a "universal" library.

Also I can't find CurieIMU in library manager and it confuses me more

I think it is doing exactly what it should do. As I understand it " The CurieIMU library uses the IMU (accelerometer + gyroscope) built into the Arduino 101. The Nano does not have this. Also The Arduino Genuino 101 processor runs two tiny cores, an x86 (Quark) and a 32-bit ARC architecture core, both clocked at 32MHz, the Nano is also missing these. I recommend you get the proper board to get this to load and operate.

Oh so I've chosen the wrong board. Can you recomend me any library where I can use MPU6050 with Nano Every. I'm struggling with I2Cdevlib because it doesn't work well with low baudrate and shuts down after some time.

Try this Mahony fusion filter for the MPU6050. Don't forget to calibrate the gyro (done automatically with the MPU6050_Mahony_calgyro.ino library example).

To calibrate the accelerometer, study this tutorial: Tutorial: How to calibrate a compass (and accelerometer) with Arduino | Underwater Arduino Data Loggers

Since there is no horizon reference with a 6DOF IMU, the yaw angle is always relative to the starting orientation.

1 Like

Thank you! I really appreciate it

Calibrating the accelerometer is not required, but it does improve the accuracy. To get started, use this line for the accelerometer calibration constants:

float A_cal[6] = {0.0, 0.0, 0.0, 1.000, 1.000, 1.000}; // 0..2 offset xyz, 3..5 scale xyz

Hi @ketjow

The explanation for these things is that "CurieIMU" is a "platform bundled" library. These libraries are distributed as part of the boards platform you manage via the Arduino IDE Boards Manager, rather than the standalone libraries you manage via Library Manager. The platform bundled libraries are always available when compiling for a board of the platform it is bundled with, but never accessible when compiling for other boards.

1 Like

Great explanation, now I understand Thank you!

You are welcome. I'm glad if I was able to make the situation more clear.

Regards,
Per

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.