We have already seen how to connect Arduino UNO with NodeMCU/ESP8266 over UART and send data to MQTT broker here.  That project uses lua to program the NodeMCU