Skip to main content

17. MPU-9250 Coding Stuff


When we last left off, the MPU-9250 sensor was soldered, and so I had no more excuses to put off coding sigh.
Screenshot from tutorial (Mitov, 2016)
The first tutorial I tried was this one, pictured above. The writer suggested this software called Visuino, and after following it, this is what I ended up with



I have to say this tutorial was really helpful and easy to follow, but the results weren't really what I could use. I basically just needed the readings to be numbers that were sent to the Serial port so I could read the information in Unity.

Video showing output from Visuino.

(Arduino Learning, n.d.)

The next tutorial I tried was this, which still didn't give me the results I needed.

How to use MPU-9250 Gyroscope, Accelerometer, Magnetometer for Arduino (Robojax, 2018)
Finally, I found this YouTube tutorial which included this library, which after installation I managed to get the serial read to give me numbers I could use.

SOLID PROGRESS. I think next blog post I'll explain what I'm actually trying to do with all these sensors because I don't think I've explained it yet hahaha.

Update* Realised that the videos I added before were uploaded as images, reuploaded them onto YouTube to re-embed here, hence the later date of the video upload compared to the post.

References:
Arduino Learning, n.d. Arduino and MPU-9250 example [Online] Available at: http://arduinolearning.com/code/arduino-mpu-9250-example.php [Accessed 30 March 2019]

Borderflight, 2018. MPU9250 [Online] Github. Available at: https://github.com/bolderflight/MPU9250 [Accessed 30 March 2019]

Mitov, 2016. Arduino: Accelerometer Gyroscope Compass MPU9250 I2C Sensor [Online] Hackster.io. Available at: https://www.hackster.io/mitov/arduino-accelerometer-gyroscope-compass-mpu9250-i2c-sensor-79f5bf [Accessed 30 March 2019]

Robojax, 2018. How to use MPU-9250 Gyroscope, Accelerometer, Magnetometer for Arduino [Online Video] Available at: https://www.youtube.com/watch?v=mzwovYcozvI [Accessed 30 March 2019]

Comments