Skip to content
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

ArduinoCloud.update(); delay occures #319

Closed
punj opened this issue May 26, 2022 · 5 comments · Fixed by #340
Closed

ArduinoCloud.update(); delay occures #319

punj opened this issue May 26, 2022 · 5 comments · Fixed by #340
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@punj
Copy link

punj commented May 26, 2022

Hello!,

I've attached a 3x4 matrix keypad and integrated the code with Arduino IoT cloud. However, I could see that
after writing ArduinoCloud.update(); it prints after a delay of about a second and therefore if any key is pressed during that particular moment is not being captured.

void loop() {
  ArduinoCloud.update();
  Serial.println(" PRINT CONTINUOSLY" );
}

Can somebody help me to run both of the lines of code independently without blocking?

I really appreciate any help you can provide.

@pennam
Copy link
Collaborator

pennam commented May 26, 2022

@punj what board are you using? There is no RTC support for ESP boards.
I suspect the delay is due to NTP requests occurring during the update() call.

@punj
Copy link
Author

punj commented May 26, 2022

@pennam Thanks for your quick reply. I am using ESP32. I think yes delay is due to an NTP request, but what is the best way to run both simultaneously? Otherwise, Keypad, RFC522, and other sensors all will have to face this delay issue. Thanks

@pennam
Copy link
Collaborator

pennam commented May 26, 2022

I would say the best option is to add the RTC support, maybe this can help you espressif/arduino-esp32#3641

@punj
Copy link
Author

punj commented May 26, 2022

@pennam, Thanks but I am not looking solution for using Real Time Clock and I need the solution that helps to capture keypad keypressed immediately. Right now, due to some reason appx 1 second delay is taking place, so in the meantime it doesn't capture keyPressed.

@pennam
Copy link
Collaborator

pennam commented May 26, 2022

If you need a solution to reduce the dealy caused by NTP requests adding RTC support is the correct thing to do.

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Nov 4, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants