.. highlight:: java Led === The `Led `_ module interacts with the on-board LED. We have a `blog post `_ that takes a more in depth look at the module. While it is for the older APIs, the attributes are still pertinent for the updated Led class. Setting Patterns ---------------- LED patterns function as a pulse with four main parameters to modify: rise time, high time, fall time, and duration. These parameters are modified using the `ColorChannelEditor `_ and each color channel (rgb) is configured independent of the other colors, allowing you to program different patterns for each color. :: import com.mbientlab.metawear.module.Led; // Set the blue channel to turn on for 5 seconds mwBoard.getModule(Led.class).configureColorChannel(Led.ColorChannel.BLUE) .setRiseTime((short) 0).setPulseDuration((short) 1000) .setRepeatCount((byte) 5).setHighTime((short) 500) .setHighIntensity((byte) 16).setLowIntensity((byte) 16) .commit(); Pattern Playback ---------------- Controlling the pattern playback is handled with the `play `_, `pause `_, and `stop `_ methods. The stop method also functions to clear the programmed patterns and the play method has an autoplay feature that will play any pattern as soon as it is programmed. :: import com.mbientlab.metawear.module.Led; Led ledModule= mwBoard.getModule(Led.class); // Immediately play a pattern when it is programmed, // play any patterns already programmed ledModule.play(true); // Stop playing patterns and clear all programmed patterns ledModule.stop(true);