code: async def set_pin_mode(self, command):
          
          pin = int(command[0])
          mode = int(command[1])
          if mode == Constants.INPUT:
              cb = self.digital_callback
          elif mode == Constants.ANALOG:
              cb = self.analog_callback
          else:
              cb = None
  
          await self.core.set_pin_mode(pin, mode, cb)
docs: This method sets the pin mode for the selected pin. It handles: Input, Analog(Input) PWM, and OUTPUT. Servo
          is handled by servo_config().
          :param command: {"method": "set_pin_mode", "params": [PIN, MODE]}
          :returns:No return message.