Error in sending ADC reading to MQTT broker

Dear Nordic community,

I am currently trying to send ADC sensor reading to MQTT broker(hivemq). I have successfully sent some data to the mqtt broker. However, the reading fo the data that I am sending is 0, which is not the adc sensor reading that it should be (meaning that the data_value is not updated and remains in its initial value). Below is my attached file, can anyone give me some suggestions?

 mqtt_simple_sensor (3).zip

Related