jesuso/esp32-wifi
#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); } }
© 2017–2024XOD Inc
Contact us: hello@xod.io