Sending a rf 433mhz signal for 20 seconds

Hi, I bought a wemos d1 mini and I'm trying to use it to send a 433mhz signal for 24 seconds with rc-switch, the problem is that the signal is sent just for 1 or 2 seconds when I press the button to send it.
Previously I used an arduino+ a raspberry pi for it and it worked.(the code that I'm using is modified from it, I mostly added the web server part and user+pass)

Here is my code #include <ESP8266WiFi.h>#include <ESP8266mDNS.h>#include <ArduinoOTA.h>#in - Pastebin.com
I think it might be because I'm using millis, but I'm not sure, or it might be because of something inside the webserver code, honestly I'm confused.

Please check the advice about How to use Forum and attach code and similiar info. Nobody likes downloading code. Some can't even read it.

I solved my problem, I needed to add yield(); in my loop