I'm trying to ride Occam's razor in diagnostics today. Not asking for homework help.
Without a long winded post of what I've done and what I haven't .. Playing with the MPU6050 gyroscope and the UNO board, displaying the results on a 2x20 VFD display scavenged from a cash register.
The display output is working. I've been using exclusively other peoples code to talk to the sensor for a proof of concept before I play about with writing my own and continuing my code journey.
Three different authors and the same results .. there is no change in the data displayed. As if the sensor mute.
Having awesome confidence in my hardware and 4 connections, first thought first try was I had crap code .. but three different sketches makes that doubtful.
Then went down the bunny hole seeing if the Wire.h protocol is included in the IDE .. seems, according to the Internet, to be. So I assume from the sketch side that the UNO and sensor are able to talk, if not actually doing so? Maybe?
So what I'm lookin for is the most basic and minimum of code lines as a diagnostic tool that will definitively prove that the sensor (if wired correctly) is in fact alive, kicking, and speaking I2C, or dead as a dog doo and get another sensor.
I've seen bad silicon out of the box in my days, so it's possible - but again, Occam .. and Taylor Swift .. It's likely me .. me .. I'm the problem, it's me.
Hope it's ok for an Arduino beginner to offer a suggestion. Use File->Examples->Wire->i2c_scanner. All it does is check every 5 seconds and lists any I2C gadgets it finds as - "I2C device found at address 0x68 !" or whatever other address.
Absolute awesome sauce! Exactly what I was looking for I think. God hat for the day and a pint on me, mate.
After bopping the serial baud rate down to 9600, Returned 'no I2C device found'.
Steers me in the direction of either my hookup leads .. about a foot of loose bell wire on all four connections .. are heavy on inductance and forking the signal, or the sensor itself has pooped the proverbial bed.
The former easy enough to test, and if discounted .. it's by default the latter.
My first reaction to your reply was "Am I just out of gas?" I'm actually unfamiliar with the protocol intimately, but yes and no. Didn't know they were required, but I checked the sensor board and there are 2.2K pullups .. Still, this is something to keep in mind for future unforkery.