I could not get this sketch working with my MPU9255 chip at first.
I have tried that slightly modified sketch and it worked : GitHub - moderndevice/MotionPlug: Motion Plug demo sketch
I went back to the avrcopter sketch and inexplicably it sudently it work. I am scratching my head.
Be careful : long SDA and SLC cable (or poor connection) an cause problem. Use pull up resistor if you use 5V board - see Motionplug.ino intro remarques for more info.