Search in sources :

Example 1 with AlphanumericDevice

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

the class AdafruitAlphanumericUnit method onInitialization.

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

Aggregations

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