Hi,
what is about machine.idle()? On my board it seems not to be available:
>>> import machine
>>> machine.idle()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'idle'
MicroPython v1.8.1-30-g343b5c1 on 2016-06-10; ESP module with ESP8266
thanks
Simsys