Closed udellc closed 7 months ago
To be more clear, a new file with the file name is made on the SD, but never filled with data.
DIAGNOSED: You need to have the external DS3231 Featherwing attached and in place in order for even the SD logging functions to work!
Describe the bug When trying to log to SD using the Adalogger version of hypnos, the program freezes. It does not freeze when you remove the hypnos.logToSD(); function. Hang is critical in that I have to hit the reset button twice to put M0 into bootloader mode to program again. Not needed when log sd function removed.
Data is NOT saved to SD card, no new files are made.
Also, including these in setup to log prints wont even work!: // This will log all LOG, ERROR, WARNING and any other logging calls to a file on the SD card ENABLE_SD_LOGGING;
Hardware in Use Adalogger M0
To Reproduce Upload the following code. Run it on the Adalogger with the STEMMA sensor plugged in, or comment it out and just log analog or something.
Expected behavior Device should log sensor data to SD and keep doing so at 5 second intervals. No sleep
Code
Output ``` ``` 09:17:05.015 -> [SD Manager] Initializing SD Card... 09:17:05.015 -> [SD Manager] Successfully initialized SD Card! 09:17:05.015 -> [SD Manager] Data will be logged to Device0.csv 09:17:05.015 -> [DEBUG] [:initializeRTC:177] Initializing DS3231.... 09:17:05.015 -> [WARNING] [:initializeRTC:187] RTC lost power, let's set the time! 09:17:05.015 -> [DEBUG] [:initializeRTC:205] DS3231 Real-Time Clock Initialized Successfully! 09:17:05.015 -> [2005.05.05 05:05:85] [DEBUG] [:initialize:217] Initializing Modules 09:17:05.025 -> [2005.05.05 05:05:85] [DEBUG] [:initialize:28] Successfully initialized STEMMA Version: 263858063 09:17:05.025 -> [2005.05.05 05:05:85] [DEBUG] [:initialize:223] Setup Complete 09:17:05.025 -> [2005.05.05 05:05:85] [DEBUG] [:measure:68] Measuring 09:17:05.025 -> [2005.05.05 05:05:85] [DEBUG] [:measure:85] Measuring Complete 09:17:05.025 -> [2005.05.05 05:05:85] [DEBUG] [:package:95] Packaging 09:17:05.025 -> [2005.05.05 05:05:85] [DEBUG] [:package:125] Packaging Complete 09:17:05.025 -> [2005.05.05 05:05:85] [DEBUG] [:display_data:198] Data Json: 09:17:05.025 -> 09:17:05.025 -> { 09:17:05.025 -> "type": "data", 09:17:05.025 -> "id": { 09:17:05.025 -> "name": "Device", 09:17:05.025 -> "instance": 1 09:17:05.025 -> }, 09:17:05.025 -> "contents": [ 09:17:05.025 -> { 09:17:05.025 -> "module": "Packet", 09:17:05.025 -> "data": { 09:17:05.025 -> "Number": 1 09:17:05.025 -> } 09:17:05.025 -> }, 09:17:05.025 -> { 09:17:05.025 -> "module": "STEMMA", 09:17:05.025 -> "data": { 09:17:05.025 -> "Temperature": 28.94985962, 09:17:05.025 -> "Capacitive": 598 09:17:05.025 -> } 09:17:05.025 -> } 09:17:05.025 -> ], 09:17:05.025 -> "timestamp": { 09:17:05.025 -> "time_utc": "2023-01-11T7:46:25Z", 09:17:05.025 -> "time_local": "2165-165-165T165:165" 09:17:05.025 -> } 09:17:05.025 -> } ``` ```
Additional context Add any other context about the problem here.