Hello, not fully sure if this question belongs to this section.
But in simple as possible terms... I have code that does all type of things with MPU6050... it does not work properly.
So I take another code that simply measures the angle of the MPU6050 reading in X and Y just to see if it reads them properly.
I run the simply angle program and tilt the MPU6050 90 degrees. The Serial monitor gives me 90 degrees that's fine.
I now upload and run my complex code. It still works incorrectly.
Now if I once again go back to the simple angle code, upload it and tilt the MPU6050 90 degrees, the Serial Monitor now gives me 45 degrees instead...
More so.Without turning off the Arduino, if I now simply connect a new MPU6050 it will give me the proper 90 degrees.
If I repeat the procedure of uploading the complex code and go back to the simple code, this new MPU6050 will now give me 45 degrees... and if I connect the previous MPU6050 it will show the proper 90 degrees...
I gotta admit I'm clueless with the Arduino but isn't uploading new code suppose to completely erase the previous one, or what else could be the reason for this annoying problem...