Das Objekt Pin: Unterschied zwischen den VersionenAus Attraktor Wiki
Version vom 18. Januar 2024, 21:26 UhrIn Python ist alles ein Objekt und Objekte haben eine ID. >>> from machine import Pin >>> print(Pin(11)) Pin(GPIO11, mode=IN, pull=PULL_DOWN) >>> b_up = Pin(11, Pin.IN, Pin.PULL_DOWN) >>> Pin(11) Pin(GPIO11, mode=IN, pull=PULL_DOWN) >>> print(Pin(11)) Pin(GPIO11, mode=IN, pull=PULL_DOWN) >>> print(b_up) Pin(GPIO11, mode=IN, pull=PULL_DOWN) >>> x = b_up >>> print(x) Pin(GPIO11, mode=IN, pull=PULL_DOWN) |