from microbit import *
while True:
x = accelerometer.get_x()
if x < -300 or x > 300:
temp = temperature()
display.show(str(temp))
Copyright ⓒ TECH79 All right reserved