Created
August 26, 2015 02:54
-
-
Save mbientlab/0f44d57dac2b4c28431c to your computer and use it in GitHub Desktop.
Copy of the code added to the home panel of the MetaWear Android app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
view.findViewById(R.id.program_keychain).setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
switchModule.routeData().fromSensor().monitor(new DataSignal.ActivityHandler() { | |
@Override | |
public void onSignalActive(Map<String, DataProcessor> map, DataSignal.DataToken dataToken) { | |
ledModule.configureColorChannel(Led.ColorChannel.BLUE) | |
.setHighIntensity((byte) 31) | |
.setHighTime((short) 50) | |
.setPulseDuration((short) 500) | |
.setRepeatCount((byte) 3) | |
.commit(); | |
ledModule.play(false); | |
} | |
}).commit(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment