IoT Cloud Messenger Widget - dynamic value

Hi Experts,

My equipment are the following;

  • Portenta H7.
  • Portenta Mid Carrier.
  • Connected to my lAN via Wi-Fi

I have been trying to send a message to the Messenger widget in the IoT cloud. This message must be a message that containes an ever changing interger value. Like the below few messages.

  • "Bale number 22432 has just been made"
  • "Bale number 22433 has just been made"
  • "Bale number 22434 has just been made"

And so it sends a message every 3 to 15 min when a bale was made.

To send the "Bale number" and the "has just been made" is not a issue but to add the changing interger value has been a problem to get right.

I did use the itoa() to convert the interger to asci but the value of 29148 becomes 70734 if I send this to the messenger widget without the other part of the message.

Have anybody tried to use the messenger widget in this way by sending a message that containes a changing interger value?

Hi,
probably this is not the most elegant solution, but it should work (assuming your messenger widget is linked to cloudVar):

    cloudVar = "Bale number ";
    cloudVar += bale;
    cloudVar += " has just been made";
1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.