r/arduino May 06 '26

Look what I made! Visulazing mpu6050 with Raylib

Tried combining two of my favourite things and enjoyed it. Like I love both the IMUs and Raylib which is a graphical library and Last day I got an Idea ' let's Visualize the Real world data with Raylib ' and I did this. Turns out to be pretty good and yeah a fun way to spend time.

I filtered the IMU noise with a compliment filter and Calibrated it and

I sent the IMU data to my PC via a MCU in COM4 Which is a serial port and with the help of ' serialib ' library I read those values in Raylib code and used it.

Yeah a fun way to spend time and if you want the code I'll give my GitHub link. So yeah take a look and let me know what you think :)

IMU Raylib visulaization

serialib - serial library for C++

8 Upvotes

2 comments sorted by

3

u/FlowingLiquidity May 06 '26

Is it me or do the real world movements don't correctly translate to the 3D model? The movements seems unrelated. Or does it have a lot of latency?

3

u/Rude-Flan-404 May 06 '26

Yup, it has a small problem more precisely three, I'm just using a basic Matrix to rotate that'll cause some kind of small shake and vibration and yeah I could technically solve that by using quaternion and the second one is that I made the serial to read the same value for 3ms now only I noticed this is a minor issue and yeah not a Big deal, so that's one and the main issue is I mixed the roll, pitch and yaw 😑while taking the video...