Skip to content

Question about client.connect() #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
anglerfish27 opened this issue Oct 3, 2023 · 1 comment
Open

Question about client.connect() #69

anglerfish27 opened this issue Oct 3, 2023 · 1 comment
Labels
question Further information is requested

Comments

@anglerfish27
Copy link

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

@iabdalkader iabdalkader added the question Further information is requested label Oct 4, 2023
@iabdalkader
Copy link
Collaborator

You shouldn't need to add/register more cloud objects after connecting, because all of them are known beforehand, can you post a simple code example of what you want to do ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants