Problem with cast

5 views
Skip to first unread message

jmajyo

unread,
May 29, 2016, 7:57:10 AM5/29/16
to MQTT
Hi, I have the following code:

                        void *l;
l=&par.ambient;
if(conectada)
{
message.payload=l;
MQTTPublish(&c,"light",&message);
}
par.ambient is declared as float.
message.payload must be a void *

my problem is that MQTTPublish, publish the direcction of the array and not its value. I need the value. Someone can help me? 
Thanks
P.S: sorry about my english.

jmajyo

unread,
May 29, 2016, 7:59:12 AM5/29/16
to MQTT
I forgot, this code is "C" and the library I am using is MQTTClient.h
Reply all
Reply to author
Forward
0 new messages