Hello. I am trying to do my first MQTT project with Arduino SP32 and Ubidots.
My goal is a simple digital temperature sensor 3 wires. But I get compile error when following an MQTT Arduino script instructions. Can someone either help me fix that script, or better provice a simple code that would send the temperature to Ubidots and to an app on my iphone. Thank you! Jimmy
Compile error.txt (6.8 KB)
Well I have to say I am surprise that no one reply and tried to help. I was told that Ubidots has a great community for support. I guess I was wrong.
Hello @jimmy747,
Thank you for reaching out on our community forums.
Firstly, I’d like to apologize for the delay in our response. We strive to address queries promptly, but please note that our active forum support hours are from Monday to Friday, 8:00-18:00. We appreciate your understanding.
Onto your issue with the MQTT Arduino script: The compiler error you’re encountering is due to the abs()
function call being ambiguous. A simple fix would be to cast the argument of the function call as follows:
if (abs(static_cast<long>((unsigned long) millis() - timer)) > PUBLISH_FREQUENCY) { //your logic goes here }
This adjustment should resolve the error you’re experiencing.
If you have any further questions or need additional assistance, please don’t hesitate to ask. We’re here to help!
Best regards,
–Juan David
Thank you Juan. Sorry for my comment. That works! Now I have a hard time connecting with MyMQTT EasyMQTT apps on iOS
I can’t find an Ubidots app on IOS. Is there one?
Thank you
Greetings @jimmy747 I hope you are doing great.
No worries at all!
Currently the Ubidots app for IOs is on beta phase. You can join the beta test program from the following link
However, as it’s not currently released, it might not work 100%.
Best regards
–Juan David
Sorry for my late reply. Thank you. I did !