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

Loom doesn't set time until after sample period #194

Open
BGoto808 opened this issue May 11, 2022 · 9 comments
Open

Loom doesn't set time until after sample period #194

BGoto808 opened this issue May 11, 2022 · 9 comments

Comments

@BGoto808
Copy link
Contributor

Describe the bug
When manually setting the RTC time through the serial monitor, the time doesn't get set for the clock until after the sample period which may cause issues if the user doesn't wait until the end of the sample period.

Hardware in Use
Feather + Hypnos (or any RTC device)

To Reproduce
Steps to reproduce the behavior:

  1. Go to Hypnos_SD_Sleep example
  2. Compile and upload code to Feather
  3. Boot up serial monitor and enter in time values as it prompts
  4. Disconnect Feather before the program puts it to sleep

Expected behavior
The time will not be set and will reprompt the user for it the next time

@kurtjd
Copy link

kurtjd commented May 12, 2022

Is this using the Loom 2 example or the Loom 3 one? This is surprising since from what I remember when I was digging around in the Loom RTC code is that the time gets set before setup() ends and loop() even starts, but who knows, might be something weird going on.

@udellc
Copy link
Member

udellc commented May 12, 2022

Yes I would have thought the user-input time from serial is prompted in Setup - so it should set the time before leaving Setup. But according to Bryson's usage it does not. Do you think you can reproduce the issue for Kurt, Bryson?

@BGoto808
Copy link
Contributor Author

This is for Loom 3. You can grab a dendrometer node from the lab and reproduce it by uploading the Dendrometer node code on the GitHub. The code is setup so that the magnet needs to be in a good position before moving onto the loop.

So you can test it by setting the time and the code will automatically stop when the sensor tries to read the magnet position.

@udellc
Copy link
Member

udellc commented May 12, 2022

Maybe we can look at this sometime next week?

@BGoto808
Copy link
Contributor Author

I can send an updated testing guide for using the Dendrometer node to test this issue so that someone can test it next week.

@udellc
Copy link
Member

udellc commented May 12, 2022

Thanks,

@kurtjd
Copy link

kurtjd commented May 12, 2022

I will see if I can reproduce this without Dendrometer first. If it happens with just a simple Feather + Hypnos setup it's likely a Loom issue. I'll update this with what I find.

@udellc
Copy link
Member

udellc commented May 12, 2022

Thanks!

@kurtjd
Copy link

kurtjd commented May 16, 2022

I was not able to replicate this using a Feather M0 WiFi and Hypnos v3.3. Using the Loom 3 Hypnos_SD_Sleep example, I first reset the RTC and as expected I was prompted to enter a custom time. I immediately removed power from the Feather and after plugging it back in, it seemed the time was set correctly and it did not reprompt me.

Thinking that maybe the Feather went to sleep before I could unplug it, I reset the RTC again and I put in a 10 second delay right before the Feather would go to sleep to ensure I had time to remove power before sleep. Again, after trying this, the RTC seemed to be set correctly despite losing power before going to sleep.

So this doesn't appear to be a general Loom issue. Is there any other information you have that might further help narrow this down?

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

No branches or pull requests

3 participants