It's being quite long I was trying everything with the code. However the code is giving error while the code in my OP is still working fine (Sadly in wired mode) The screenshot of both is given below. Please help. Getting the warning during compilation.
"WARNING: library MPU6050 claims to run on avr, samd architecture(s) and may be incompatible with your current board which runs on esp8266 architecture(s)."
However, after upload, it is properly pinging after connecting to a power bank but no data from MPU is coming.