ESP_MQTT saving data from topic

paleeee
Posts: 1
Joined: Mon Jul 04, 2022 5:47 pm

ESP_MQTT saving data from topic

Postby paleeee » Mon Jul 04, 2022 6:05 pm

Hello!
I'm very new to ESP-IDF and C programming in general. I'm currently studying the example on Github about MQTT over TCP (https://github.com/espressif/esp-idf/tr ... s/mqtt/tcp).

If I understand correctly the data I sent or received is available in event->data. How can I save this data as text, so that I can compare it
and make it do something (ex. if (strcmp(a, b) == 0) { do stuff }).

An example would be very appreciated!

Regards,
palee

tommeyers
Posts: 184
Joined: Tue Apr 17, 2018 1:51 pm
Location: Santiago, Dominican Republic

Re: ESP_MQTT saving data from topic

Postby tommeyers » Tue Jul 05, 2022 2:15 pm

IT Professional, Maker
Santiago, Dominican Republic

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], ChrisP_SD, JVKran and 121 guests