Hi there! I’ve just got the MinIMU-9 V5 the other day and have been tinkering with it a bit. Ultimately I will be using it in conjunction with 4 flex sensors with all data being sent via serial bluetooth to Max MSP for conversion to midi. My current problem is that I am a beginner with code and I don’t understand much of the resources provided with this product and on the internet. I feel that my requirements are very simple compared to what most of these codes and projects seem to be doing. Right, there’s a question in here I promise!
Basically, I only want the board to output 4 different pieces of data on four new lines (and then repeat). I only need a single numerical reading for the X, Y, Z axis and the accelerometer (likely the Y axis will be sufficient). I can’t seem to find straightforward addresses for these as the data sheet seems to provide multiple and I can’t find an explanation for this. I’m hoping someone can point out what I seem to obviously be missing?
** Have downloaded the LSM6 library, using Arduino Uno.
Thanks so much for your help!!
What numerical reading do you have in mind?
The IMU has three different sensors, a gyro that measures rotation rates about each axis, a magnetometer that measures the magnetic field along each axis, and an accelerometer that measures the acceleration along each axis.
There is some great background reading at http://www.chrobotics.com/library which should help you become familiar with the function and use of each sensor.
Thanks for replying! Thank you for the link as well - it’s definitely helping me visualize these axis better.
I’ve had experience on a similar project using a Wii remote and OSCulator - which output a reading between 0-1 each for Yaw, Roll and Pitch. (I didn’t get the chance to experiment with the accelerometer however.) I took these and scaled them (0, 1) to (0, 127) for ease of use with Midi.
I suppose something similar to that is what I’m after (the actual numbers don’t matter as I can scale them of course). I realize now I said “single numerical reading” and I meant one reading for each axis, sorry!
The MinIMU-9 V5 gives you three “numbers”, or readings, for each axis: rotation rate, acceleration and magnetic field.
If you want yaw, pitch and roll angles you will need to use AHRS software. You can use the Pololu-supplied software https://github.com/pololu/minimu-9-ahrs-arduino, or consider using RTImulib, as I described in this post: State of the art AHRS for $25
I have tried to run this sketch, but get different error messages each time when compiling. I’ve seen now it is because I didn’t have the L3G and LSM303 libraries by Pololu. I’ve installed these and the code is now uploaded, however when I open the serial monitor all that shows up is “+��”.
I’ve now tried to run the LSM6 Serial example sketch which appears to be the closest to what I want. I’ve determined that <imu.a.y> is closest to a Roll reading, and <imu.a.x> is basically a pitch reading. However of course there is no “yaw” equivalent as Z is facing up or down, so it may be worth getting the AHRS working, but it is quite above my head…
You have a Baud rate mismatch between the program and the serial monitor. Check that the number in Serial.begin() and the lower right corner of the serial monitor window match.
Ah of course, what a silly mistake. Thanks for that.
I’ve read in the ReadMe that the data should output via the Serial Monitor but now all I see is “Pololu MinIMU-9 + Arduino AHRS.”
Is it possible to use/run the RTimulib with the MinIMU-9 V5? The MinIMU-9 v5 has the LSM6DS33 and LIS3MDL Carrier mounted, which is not listed within the RTIMULibDefs.h. The L3GD20H and LSM303D Carrier
had been obsoleted (minIMU-9 v3). The Pololu AHRS and RTimulib are both great code/sketch and I hate to see great works been fading out due to upgrade.