Skip to content

Question about client.connect() #69

Open
@anglerfish27

Description

@anglerfish27

I am posting here as this is more of a question because sadly the Arduino forums are not very responsive.

I've gotten several 2040's and ESP32 variants connected now which is cool. I have a question the though, the workflow is all the same as in your examples ending in client.connect() at which essentially puts the program into a loop that never ends and you can't seem to add to it. For example anything after client.connect() doesn't get executed. Is there way to implement this so I can still also continue having other things execute, say updating the same values going to the IoT cloud to an LCD? Right now best I could accomplish is getting the initial values to the LCD (which also go to the IoT cloud) but subsequent updates all take place in whatever loop is created in client.connect().

Is there a better way for me to do this? Do I need to disconnect from the cloud, run my code and then re-connect to update the cloud?

I apologize for the fundamental question and thank you for being kind enough to help with my other real issues in the past. Its clear I'm new to IoT Cloud usage and I don't want my MCU "stuck" doing nothing else but updating the cloud every X seconds or minutes. I want that time back to process other things outside the cloud. Curious on your thoughts on how to do this or a sample type snippet!

Lastly and I know this isn't you, its Arduino, but I am now on the paid version of the cloud due the number of things and devices, and I was expecting maybe getting more widgets unlocked. Nope. Same ones. Very basic, boring and don't cover a lot of things. I hope you can pass that constructive feedback to Arduino that they need to continue building out widgets and NOT just for Arduino code but MicroPython too. They decided to jump on the Micropython train so they have to support it 100% just like their beloved weird Arduino C/C++ implementation.

Respectfully and thank you in advance,
Anglerfish27

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions