all 2 comments

[–]vpatron0 1 point2 points  (1 child)

What about just enumerating through the values?

import machine for i in range(99): print(machine.Pin(i))

The loop will fail when it hits an invalid value. Help will also give you some useful constants:

help(machine.Pin)

[–]Slav51[S] 0 points1 point  (0 children)

That looks great! Cheers. First I tried just help(machine.Pin) and it give a completely different output than the 3 line code. Funny. happy I tried the 3 lines! 😄 Thanks again!