MMR

How can I see the hardware and model number of my mmr device (named metawear: private static MetaWearBoard metawear = null;) using the modelNumber and hardwareRevision of the DeviceInformation class. How should I write it in the code?
Thank you

Comments

  • Hello @RaquelProus ,

    If I understand correctly, you would like to get the Modal Number and Hardware Revision value from the DeviceInformation class using Android SDK.

    Given a board variable as board, the code looks somewhat like this, based on readDeviceInformationAsync function on documentation.
    https://mbientlab.com/documents/metawear/android/latest/

    private MetaWearBoard board;
    
    board.readDeviceInformationAsync().continueWith(new Continuation<DeviceInformation, Void>() {
        @Override
        public Void then(Task<DeviceInformation> task) throws Exception {
             DeviceInformation info = task.getResult();
             Log.d("DeviceInformation", info.modelNumber);
             Log.d("DeviceInformation", info.hardwareRevision);
             return null;
        }
    });
    
  • Thanks a lot!

Sign In or Register to comment.