import api not compiling
For the line :
import com.mbientlab.metawear.api.MetaWearBleService;
as in the example: https://gist.github.com/mbientlab/a590e4f9e41de5c21f73
I'm getting compilation error: package com.mbientlab.metawear.api does not exist
Please suggest
thanks
Udi
This discussion has been closed.
Comments
try {
ltr329Module = mwBoard.getModule(Ltr329AmbientLight.class);
ledCtrllr = mwBoard.getModule(Led.class);
} catch (UnsupportedModuleException e) {
e.printStackTrace();
}
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
.commit();
ltr329Module.routeData().fromSensor()
// allow lux values through that are less than 10000
.process("comp_filter", new Comparison(Comparison.Operation.LT, 10000))
.monitor(new DataSignal.ActivityHandler() {
@Override
public void onSignalActive(Map<String, DataProcessor> processors, DataSignal.DataToken token) {
ledCtrllr.configureColorChannel(Led.ColorChannel.GREEN)
.setRiseTime((short) 0)
.setPulseDuration((short) 1000).setRepeatCount((byte) 5)
.setHighTime((short) 500).setHighIntensity((byte) 31)
.commit();
ledCtrllr.play(false);
ltr329Module.stop();
}
})
.commit();