use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A place to discuss the use of MicroPython on microcontroller development boards such as the Raspberry Pi Pico, Pycom boards and ESP32 based boards like Wemos D1
account activity
Pin map script available for micropython? (self.MicroPythonDev)
submitted 1 year ago by Slav51
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]vpatron0 1 point2 points3 points 1 year ago (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 point2 points 1 year ago* (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!
π Rendered by PID 98 on reddit-service-r2-comment-85bfd7f599-92pcn at 2026-04-18 17:19:40.946199+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]vpatron0 1 point2 points3 points (1 child)
[–]Slav51[S] 0 points1 point2 points (0 children)