getId method

int getId()

Returns the internal hardware id of the hat. RPI_HAT_PID (0x4) for a 'Grove Base Hat RPi', and RPI_ZERO_HAT_PID (0x05) for a 'Grove Base Hat RPi Zero'.

Implementation

int getId() {
  if (_id == 0) {
    _id = _read16BitRegister(0x00);
  }
  return _id;
}