{"action":"closed","issue":{"url":"https://api.github.com/repos/tuanpmt/esp_mqtt/issues/39","labels_url":"https://api.github.com/repos/tuanpmt/esp_mqtt/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/tuanpmt/esp_mqtt/issues/39/comments","events_url":"https://api.github.com/repos/tuanpmt/esp_mqtt/issues/39/events","html_url":"https://github.com/tuanpmt/esp_mqtt/issues/39","id":56807228,"number":39,"title":"Getting the received data","user":{"login":"eliabieri","id":7094813,"avatar_url":"https://avatars.githubusercontent.com/u/7094813?v=3","gravatar_id":"","url":"https://api.github.com/users/eliabieri","html_url":"https://github.com/eliabieri","followers_url":"https://api.github.com/users/eliabieri/followers","following_url":"https://api.github.com/users/eliabieri/following{/other_user}","gists_url":"https://api.github.com/users/eliabieri/gists{/gist_id}","starred_url":"https://api.github.com/users/eliabieri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliabieri/subscriptions","organizations_url":"https://api.github.com/users/eliabieri/orgs","repos_url":"https://api.github.com/users/eliabieri/repos","events_url":"https://api.github.com/users/eliabieri/events{/privacy}","received_events_url":"https://api.github.com/users/eliabieri/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-06T12:40:12Z","updated_at":"2015-02-06T22:46:41Z","closed_at":"2015-02-06T22:46:41Z","body":"Sorry guys for the noob question but maybe someone can help me.\r\nI have a working esp_mqtt setup. I can publish data and subscribe to a topic.\r\nMy question is now:\r\nHow can I use the received data to turn a led on and off.\r\nThe received data gets processed in the void mqttDataCb() function.\r\nThe problem: I cant just do \r\nif(data==\"on\") {\r\n      gpio_output_set(BIT0|BIT2, 0, BIT0|BIT2, 0);    //Set GPIO2 to HIGH / LED ON\r\n}\r\nWhat would be the right way?"}}