use of com.robo4j.hw.rpi.i2c.adafruitbackpack.BiColor8x8MatrixDevice in project robo4j by Robo4J.
the class Adafruit8x8MatrixUnit method onInitialization.
@Override
protected void onInitialization(Configuration configuration) throws ConfigurationException {
super.onInitialization(configuration);
int brightness = configuration.getInteger(ATTRIBUTE_BRIGHTNESS, AbstractBackpack.DEFAULT_BRIGHTNESS);
MatrixRotation rotation = MatrixRotation.valueOf(configuration.getString(ATTRIBUTE_ROTATION, DEFAULT_MATRIX_ROTATION).toUpperCase());
try {
device = new BiColor8x8MatrixDevice(getBus(), getAddress(), brightness);
} catch (IOException e) {
throw new ConfigurationException("Failed to instantiate device", e);
}
device.setRotation(rotation);
}
Aggregations