You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's available only at the rp2 and samd port, as you know. It is more frequently found as part of the machine.LED class, which b.t.w. is not documented at all. The pyb.LED class is.
I really think board ports should be more harmonized for basic fonctions, otherwise we lost the theorical advantage of uPython : one code that works on different hardware ...
You're right. But then the discussion starts again about what is a basic function. The Pin class has quite a few methods which could for instance be considered as not basic, like pin.toggle(), pin.on(), pin.off(). The latter two are actually misleading, because a pin cannot be on or off. And toggle can always be written e.g. as pin(not pin()).
Ports and boards have different resources, like flash and RAM. Devices with a small flash will always provide only a subset of both the language features and hardware support.
Pin.toggle()method works (at least for RP2040 platform) but it is not documented here:https://docs.micropython.org/en/latest/library/machine.Pin.html#methods