code: def handle_dpad(self):
          
          # pylint: disable=no-member
          x_raw = self.microbit.accelerometer.get_x()
          y_raw = self.microbit.accelerometer.get_y()
          minus_sens = self.sensitivity * -1
          if x_raw < minus_sens:
              x_state = ('Absolute', 0x10, -1)
          elif x_raw > self.sensitivity:
              x_state = ('Absolute', 0x10, 1)
          else:
              x_state = ('Absolute', 0x10, 0)
  
          if y_raw < minus_sens:
              y_state = ('Absolute', 0x11, -1)
          elif y_raw > self.sensitivity:
              y_state = ('Absolute', 0x11, 1)
          else:
              y_state = ('Absolute', 0x11, 1)
  
          return x_state, y_state
docs: Gets the state of the virtual dpad.