def on_forever(): serial.write_line("" + str((envirobit.get_temperature()))) basic.pause(100) basic.forever(on_forever)