use of com.ociweb.iot.maker.FogCommandChannel in project FogLight-Examples by oci-pronghorn.
the class IoTApp method declareBehavior.
@Override
public void declareBehavior(FogRuntime runtime) {
final FogCommandChannel ledChannel = runtime.newCommandChannel(GreenCommandChannel.DYNAMIC_MESSAGING | FogRuntime.PIN_WRITER);
runtime.addDigitalListener((connection, time, durationMillis, value) -> {
ledChannel.setValue(LED_PORT, value);
});
}
Aggregations