rasterweb, to random
@rasterweb@mastodon.social avatar

I'm using python.microbit.org to write Python code for the micro:bit but one thing I don't get is things like:

pin0.write_analog(128)
pin1.write_analog(64)

So like if I want to write a function that will work with any pin how do I do that?

Do I need a big if/else with all the pins? (pin0.write_analog, pin1.write_analog, etc.)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • Hentai
  • doujinshi
  • announcements
  • general
  • All magazines