mpy_device

class mpy_device.MpyDevice

micropython board interface

This module provides a MpyDevice class to communicate with a micropython device. It allows to execute python code remote on the device.

with MpyDevice('dev/tty.SLAB_USBtoUART') as dev:
    dev.exec('import machine')
    freq = dev.eval('machine.freq()')
    dev.execfile('main.py')