Create my first code using MQTT

I have designed the attached is about connect to hivemq broker , my ask is how to code it in connect to the mentioned broker and send publish message included the topic also
Note : when click on the lamp it will light in on status

1 Like