is-connected

xod-dev/esp8266-mcu/is-connected

Checks if the device is connected to a WiFi network
is-connected
@/is-connected
Checks if the device is connected to a WiFi network
DEV@/esp8266-mcu-device
An ESP8266-based MCU
CHKpulse
Initiate the check
is-connected
OUT
DEV
CHK
DONE
DONEpulse
Emits a pulse when a check is performed
OUTboolean
True if device is connected to a WiFi network
To use the node in your project you should have the xod-dev/esp8266-mcu library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

node {
    void evaluate(Context ctx) {
        auto device = getValue<input_DEV>(ctx);

        emitValue<output_OUT>(ctx, device->status() == WL_CONNECTED);
        emitValue<output_DONE>(ctx, 1);
    }
}