Hello,
I am trying to get MPU6050 to work and it does. However, on few occasions I noticed that The read function jams the main loop like while(true) function.
I am using this example sketch which is a part of ElectronicsCats library.
In my tests, I plug the sensor out and the main thread just jams. To be exact, I am removing vcc gnd sca sda wires but not the interrupt wire. BTW I use pin 2 as interrupt.
What I want is that I should do things in my main loop function even if the sensor connection is completely disconnected.
I have tried to determine exact line that the thread jams but I have realized that it is kind of random. Since random doesn't make any sense in the world of software, I think this has to do with the interrupts, I know MPU6050 library does use them.
What would you guys do to make this sketch failure proof??