from machine import Pin
from machine import sleep
from machine import SoftI2C
import mpu6050
i2c = SoftI2C(scl=Pin(22), sda=Pin(21)) #initializing the I2C method for ESP32
stop = Pin(0, Pin.IN) #Boot button stops the readings
mpu= mpu6050.accel(i2c)
while True: # loop until Boot button is pressed
data = mpu.get_values()
print(data)
sleep(500)