Search in sources :

Example 1 with BiColor24BarDevice

use of com.robo4j.hw.rpi.i2c.adafruitbackpack.BiColor24BarDevice in project robo4j by Robo4J.

the class Adafruit24BargraphUnit method onInitialization.

@Override
protected void onInitialization(Configuration configuration) throws ConfigurationException {
    super.onInitialization(configuration);
    int brightness = configuration.getInteger(ATTRIBUTE_BRIGHTNESS, AbstractBackpack.DEFAULT_BRIGHTNESS);
    try {
        device = new BiColor24BarDevice(getBus(), getAddress(), brightness);
    } catch (IOException e) {
        throw new ConfigurationException("Failed to instantiate device", e);
    }
}
Also used : ConfigurationException(com.robo4j.ConfigurationException) IOException(java.io.IOException) BiColor24BarDevice(com.robo4j.hw.rpi.i2c.adafruitbackpack.BiColor24BarDevice)

Aggregations

ConfigurationException (com.robo4j.ConfigurationException)1 BiColor24BarDevice (com.robo4j.hw.rpi.i2c.adafruitbackpack.BiColor24BarDevice)1 IOException (java.io.IOException)1