Closed udellc closed 7 months ago
I'm not even trying to log to SD here.
You need to have the external DS3231 featherwing also attached to get the functions to work! If the Hypnos library for Adalogger Requires Both the Adalogger AND the DS3231 - can we put a check function somewhere in there to throw an error and print it saying DS3231 Required for proper functionality?
Describe the bug When setting custom time or lost power and manually setting time using the ADALOGGER version of hypnos library, UTC time appears to be set correctly, but time is set to the strange things!
Hardware in Use Adalogger M0 and Hypnos loom libraries. Also using a STEMMA soil sensor just to test i2c data logging, but sensor works on its own using the i2c STEMMA example.
To Reproduce Upload the following code I am using to test logging a STEMMA soil moisture sensor to SD using Adalogger, no sleep. Check out initialize messages, and timestamps
Expected behavior Should have correct ttimestamps
Code
Output ``` ``` 09:06:07.643 -> [WARNING] [:initializeRTC:187] RTC lost power, let's set the time! 09:06:07.681 -> [DEBUG] [:set_custom_time:278] Please use your local time, not UTC! 09:06:07.681 -> [DEBUG] [:set_custom_time:281] Enter the Year (Four digits, e.g. 2020) 09:06:22.420 -> [DEBUG] [:set_custom_time:288] Year Entered: 2023 09:06:22.420 -> [DEBUG] [:set_custom_time:291] Enter the Month (1 ~ 12) 09:06:27.326 -> [DEBUG] [:set_custom_time:297] Month Entered: 11 09:06:27.326 -> [DEBUG] [:set_custom_time:300] Enter the Day (1 ~ 31) 09:06:33.130 -> [DEBUG] [:set_custom_time:306] Day Entered: 9 09:06:33.130 -> [DEBUG] [:set_custom_time:310] Enter the Hour (0 ~ 23) 09:06:37.655 -> [DEBUG] [:set_custom_time:317] Hour Entered: 9 09:06:37.689 -> [DEBUG] [:set_custom_time:320] Enter the Minute (0 ~ 59) 09:06:41.315 -> [DEBUG] [:set_custom_time:326] Minute Entered: 6 09:06:41.315 -> [DEBUG] [:set_custom_time:329] Enter the Second (0 ~ 59) 09:06:44.740 -> [2005.05.05 05:05:85] [DEBUG] [:set_custom_time:340] Custom time successfully set to: 2005.05.05 05:05:85 09:06:44.740 -> [2005.05.05 05:05:85] [DEBUG] [:initializeRTC:205] DS3231 Real-Time Clock Initialized Successfully! 09:06:44.740 -> [2005.05.05 05:05:85] [DEBUG] [:initialize:217] Initializing Modules 09:06:44.740 -> [2005.05.05 05:05:85] [DEBUG] [:initialize:28] Successfully initialized STEMMA Version: 263858063 09:06:44.772 -> [2005.05.05 05:05:85] [DEBUG] [:initialize:223] Setup Complete 09:06:44.772 -> [2005.05.05 05:05:85] [DEBUG] [:measure:68] Measuring 09:06:44.772 -> [2005.05.05 05:05:85] [DEBUG] [:measure:85] Measuring Complete 09:06:44.772 -> [2005.05.05 05:05:85] [DEBUG] [:package:95] Packaging 09:06:44.772 -> [2005.05.05 05:05:85] [DEBUG] [:package:125] Packaging Complete 09:06:44.772 -> [2005.05.05 05:05:85] [DEBUG] [:display_data:198] Data Json: 09:06:44.772 -> 09:06:44.772 -> { 09:06:44.772 -> "type": "data", 09:06:44.772 -> "id": { 09:06:44.772 -> "name": "Device", 09:06:44.772 -> "instance": 1 09:06:44.772 -> }, 09:06:44.772 -> "contents": [ 09:06:44.772 -> { 09:06:44.772 -> "module": "Packet", 09:06:44.772 -> "data": { 09:06:44.772 -> "Number": 1 09:06:44.772 -> } 09:06:44.772 -> }, 09:06:44.772 -> { 09:06:44.772 -> "module": "STEMMA", 09:06:44.772 -> "data": { 09:06:44.772 -> "Temperature": 27.27577209, 09:06:44.772 -> "Capacitive": 373 09:06:44.772 -> } 09:06:44.772 -> } 09:06:44.772 -> ], 09:06:44.772 -> "timestamp": { 09:06:44.772 -> "time_utc": "2023-01-11T7:46:25Z", 09:06:44.772 -> "time_local": "2165-165-165T165:165" 09:06:44.772 -> } 09:06:44.772 -> } ``` ```
Additional context Add any other context about the problem here.