:mod:`esp32` --- ESP32-specific functions ==================================================== .. module:: esp32 :synopsis: ESP32-specific functions The ``esp32`` module contains functions and classes specifically for controlling the ESP32 module. Functions --------- .. function:: wake_on_touch(wake) Configure whether touch will wake the device from sleep. wake should be a boolean value. .. function:: wake_on_ext0(pin, level) Configure how `EXT0` will wake the device from sleep. - ``pin``: None or a valid Pin object. - ``level``: ``esp32.WAKEUP_ALL_LOW`` or ``esp32.WAKEUP_ANY_HIGH``. .. function:: wake_on_ext1(pins, level) Configure how `EXT1` will wake the device from sleep. - ``pin``: None or a tuple/list of valid Pin objects. - ``level``: ``esp32.WAKEUP_ALL_LOW`` or ``esp32.WAKEUP_ANY_HIGH``. .. function:: raw_temperature() Read the raw value of the internal temperature sensor and return an integer. .. function:: hall_sensor() Read the raw value of the internal Hall sensor and return an integer. Ultra-Low-Power Coprocessor -------------------------------- .. class:: ULP() This class provides access to the ultra-low-power coprocessor. .. method:: ULP.set_wakeup_period(period_index, period_us) Set the wakeup period. .. method:: ULP.load_binary(load_addr, program_binary) Load program_binary into the ULP at the given load_addr. .. method:: ULP.run(entry_point) Start the ULP running at the given entry_point. Constants --------- .. data:: esp32.WAKEUP_ALL_LOW esp32.WAKEUP_ANY_HIGH Select the wakeup level of the pin.