RPRO vs R Accelerometer

edited January 2016 in Android
I have hooked up a MetaWear RPRO board to my android app which was working with a MetaWear R. However the callback is not returning any data.

The code looks like this:

            mwCtrllr.addModuleCallback(new Accelerometer.Callbacks() {
   @Override
   public void receivedDataValue(short x, short y, short z) {
Log.i("ACCELDATA", String.format(Locale.US, "(%d, %d, %d)",
x, y, z));
   }
});
            accelCtrllr.enableXYZSampling().withFullScaleRange(Accelerometer.SamplingConfig.FullScaleRange.FSR_8G)
.withOutputDataRate(Accelerometer.SamplingConfig.OutputDataRate.ODR_100_HZ);
            accelCtrllr.startComponents();


Please advise.

Comments

  • I was using the API version 1.8.0. 

    From reading the updated documentation it seems that the callback code model was discarded entirely in later API calls in favor of some other implementaiton.

    There is an error in the documentation: 
    final Switch switchModule= mwBoard.getModule(Accelerometer.class);

    Also there is a reference to a class "CompleteHandler" which does not seem to exist.
  • Some notes. Just trying to get the device to connect.

    In the documentation it says setOutputDataRange but setOutputDataRate is correct.

    The class which I mentioned above is spelt not CompleteHandler but CompletionHandler.
  • edited January 2016
    Implemented. When I try to connect, I get 133 errors and I have to reset the BT adapter to see the device again.

    Any idea what the issue might be?
  • Can you connect to your board with the latest Android app on your device?  The app uses API v2.3.0.
  • edited January 2016
    Yes it connects via the metawear app.
  • edited January 2016
    The problems seems to be that I was attempting to re-initialize the board once it had already been initialized. 
This discussion has been closed.