Hi,
I want to change this example https://github.com/espressif/esp-mqtt/b ... pp_main.c to send every 10 seconds a temperature to a broker. I don’t understand how to modify the mqtt_event_handler for my necessity.
Send message to broker MQTT
Re: Send message to broker MQTT
This example is just to start MQTT client which will do some configuration and will start MQTT.onire77 wrote: ↑Sun Nov 18, 2018 6:17 pmHi,
I want to change this example https://github.com/espressif/esp-mqtt/b ... pp_main.c to send every 10 seconds a temperature to a broker. I don’t understand how to modify the mqtt_event_handler for my necessity.
So, You need to create pusblisher and subscriber as per your requirement and then create example to fulfill your end application
MQTT event handler is just to provide few MQTT related events which also you can used based on event you will get from MQTT
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Send message to broker MQTT
Hello,
I understand that I have to create my own event handler but I don't know how to do it. In the tcp exemple we have the user_context but I don't know how to use it. Could you explain me how it works ?
Thanks
I understand that I have to create my own event handler but I don't know how to do it. In the tcp exemple we have the user_context but I don't know how to use it. Could you explain me how it works ?
Thanks
Who is online
Users browsing this forum: brushlow18 and 197 guests