import api not compiling

For the line :
import com.mbientlab.metawear.api.MetaWearBleService;
as in the example:
I'm getting compilation error:  package com.mbientlab.metawear.api does not exist

Please suggest


  • That gist is for an older MetaWear API.  The equivalent of that code is given in the Android Documentation sample code:

  • OK, tried the following code on 'connected' state, I expect the green led to blink when darkness conditions reached but it never happen
    please suggest
    Thanks for your support
    try {
    ltr329Module = mwBoard.getModule(Ltr329AmbientLight.class);
    ledCtrllr = mwBoard.getModule(Led.class);
    } catch (UnsupportedModuleException e) {
    ltr329Module.configure().setGain(Gain.LTR329_GAIN_4X)// Set the gain to 4x
    .setIntegrationTime(IntegrationTime.LTR329_TIME_150MS)// Set integration time to 150ms
    .setMeasurementRate(MeasurementRate.LTR329_RATE_100MS)// Set measurement rate to 100ms

    // allow lux values through that are less than 10000
    .process("comp_filter", new Comparison(Comparison.Operation.LT, 10000))
    .monitor(new DataSignal.ActivityHandler() {
    public void onSignalActive(Map<String, DataProcessor> processors, DataSignal.DataToken token) {
    .setRiseTime((short) 0)
    .setPulseDuration((short) 1000).setRepeatCount((byte) 5)
    .setHighTime((short) 500).setHighIntensity((byte) 31)
  • Code works fine for me.  Did you start the sensor?
This discussion has been closed.