platypush/plugins/esp/__init__.py
def pin_off(self, pin: Union[int, str], pull_up: bool = False, **kwargs):
        """
        Set the specified PIN to LOW.

        :param pin: GPIO PIN number.
        :param pull_up: Set to True if the PIN has a (weak) pull-up resistor attached.
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        """
        device = self._get_device(**kwargs)
        pin = device.get_pin(pin)
        code = '''
import machine
pin = machine.Pin({pin}, machine.Pin.OUT{pull_up})
pin.off()
'''.format(pin=pin, pull_up=', machine.Pin.PULL_UP' if pull_up else '')

        self.execute(code, **kwargs)

        Set the specified PIN to LOW.

        :param pin: GPIO PIN number.
        :param pull_up: Set to True if the PIN has a (weak) pull-up resistor attached.
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        
Set the specified PIN to LOW.
Set the specified PIN to LOW .
def pin_off(self, pin: Union[int, str], pull_up: bool = False, **kwargs):
        device = self._get_device(**kwargs)
        pin = device.get_pin(pin)
        code = '''
import machine
pin = machine.Pin({pin}, machine.Pin.OUT{pull_up})
pin.off()
'''.format(pin=pin, pull_up=', machine.Pin.PULL_UP' if pull_up else '')
        self.execute(code, **kwargs)
def pin_off ( self , pin : Union [ int , str ] , pull_up : bool = False , ** kwargs ) : device = self . _get_device ( ** kwargs ) pin = device . get_pin ( pin ) code = '''
import machine
pin = machine.Pin({pin}, machine.Pin.OUT{pull_up})
pin.off()
''' . format ( pin = pin , pull_up = ', machine.Pin.PULL_UP' if pull_up else '' ) self . execute ( code , ** kwargs )
Set the specified PIN to LOW.
Set the specified PIN to LOW .
"""
        Set the specified PIN to LOW.

        :param pin: GPIO PIN number.
        :param pull_up: Set to True if the PIN has a (weak) pull-up resistor attached.
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        """
self
pin
Union[int, str]
GPIO PIN number.
GPIO PIN number .
pull_up
bool
Set to True if the PIN has a (weak) pull-up resistor attached.
Set to True if the PIN has a ( weak ) pull - up resistor attached .
kwargs
Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
Parameters to pass to : meth : ` platypush . plugins . esp . EspPlugin . execute ` .