I stumbled across a strange behaviour of MicroPython on my PyBoard v1.0: I want to switch the GPIO mode of a pin and had a look at the corresponding documentation (https://docs.micropython.org/en/latest/ ... e.Pin.html). I tried my best, but the PyBoard insists on me doing it wrong:
Code: Select all
MicroPython v1.12-331-ge97bb58f0 on 2020-04-02; PYBv1.0 with STM32F405RG
Type "help()" for more information.
>>>
>>> pin = pyb.Pin('X1')
>>> pin.mode(Pin.IN)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: function takes 1 positional arguments but 2 were given
Thoralt