lan-ip

jesuso/esp32-wifi/lan-ip

Gets the local IP address
lan-ip
@/lan-ip
Gets the local IP address
UPDpulse
Send request for local IP address
lan-ip
UPD
IP
DONE
DONEpulse
Pulses when IP address received
IPxod/net/ip-address
To use the node in your project you should have the jesuso/esp32-wifi 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

#pragma XOD require "https://github.com/espressif/arduino-esp32"

#pragma XOD evaluate_on_pin disable
#pragma XOD evaluate_on_pin enable input_UPD
#pragma XOD error_raise enable

#include <WiFi.h>

node {
    void evaluate(Context ctx) {
        if (!isInputDirty<input_UPD>(ctx))
            return;

        if (WiFi.status() != WL_CONNECTED) {
            raiseError(ctx);
            return;
        }

        IPAddress ip = WiFi.localIP();
        emitValue<output_IP>(ctx, ip);
        emitValue<output_DONE>(ctx, 1);
    }
}