code: def detect_microbit(self):
          
          try:
              gpad = MicroBitPad(self)
          except ModuleNotFoundError:
              warn(
                  "The microbit library could not be found in the pythonpath. \n"
                  "For more information, please visit \n"
                  "https://inputs.readthedocs.io/en/latest/user/microbit.html",
                  RuntimeWarning)
          else:
              self.microbits.append(gpad)
              self.gamepads.append(gpad)
docs: Detect a microbit.