-
Notifications
You must be signed in to change notification settings - Fork 46
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
Feature Request - add an "always on" option for continuous serial logging with slow sensor sampling #207
Comments
Hi Peter (@Beepnblink ), Which version of the firmware were you using previously? Does reverting to that earlier version fix your issue? We did make some improvements to serial logging / token timestamp printing at version 2.8. I'm wondering if something in those changes has causing the issue... Also, you say you are logging analog data too. What is the logging interval? I'm wondering if the analog logging is dominating and preventing serial logging. Have you made any changes to the analog logging interval since the upgrade? Thanks and best wishes, |
Hi Paul, I was using Version 2.6 before. Will revert back to that later to check the behaviour and report back. As for the timestamp: I am still unclear at which part of the logging data sequence I should send the \r to insert the timestamp. Currently it is at the end. Starting the logging data sequence with \r caused the timestamp to be inserted after the first character of the sequence. The analog data is temp/humididy and barometric pressure every 60s. It used to be every 10s, but there is no need to record ambient data that fast. I will try different logging rates to see if that makes any difference here. |
Hi Paul, Update: We found that the OLA was going to sleep between the analog readings. This is a default setting for analog log intervals >2s. Setting the min awake time to match the logging interval keeps the logger awake and the serial data logging. Two comments on this behaviour:
So there is a workaround to the problem we saw. Regards, |
Hi Peter, Many thanks for the update. Glad you got it working. The firmware changed a lot over the first couple of years. You can see how the firmware developed by the Terminal Output menu numbering - new features were added to the end of the menu. Initially, you could only set one logging interval / rate. If the interval was > 2 seconds, the unit went to sleep between samples to save battery power. Then users asked for fast and slow logging. Then - based on feedback from users - we added the minimum awake time to give the user time to open the serial menu when logging at slow intervals. But slow logging was always intended to be: wake, log one sample, sleep, repeat. I think this explains why you're having difficulty with the sample interval. Slow analog logging, but always being awake for serial logging is a new twist. I think you are the first person to request this. It's a good request. It should be straightforward to add an "always awake" option, preventing the unit from sleeping between samples. But I would need to walk through this carefully, to make sure it didn't conflict with anything else. I'll leave this issue open as a reminder. I can't make any promises about when I'll be able to look at this. If you have the time and resources, please modify the code and send us a Pull Request. Regarding the timestamp, the timestamp is inserted into the log file stream immediately after the token is received. You could wrap your data with line feed at the beginning, carriage return at the end, and then choose which to stamp. Best wishes, |
Hi Paul, P.S. Looking at the datasheet it might also be possible to wake up the chip when serial data has been received. Needs more investigation though. Regards, |
(also posted on sparkfun community)
I am using the OLA to log sensor data every 60s and also serial data.
The serial stream (38400Bd) consists of 4-5 packages 1s apart and repeats every 60s. I have recently upgraded the OLA to FW 2.9
Here is the problem: The serial log records the column headers sent first and one set of values and then stops. All the logged data is correct.
![Image](https://private-user-images.githubusercontent.com/46096157/407201673-a4eda99e-a50e-442a-a6a0-10fcbd086b60.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5OTQ0NDYsIm5iZiI6MTczODk5NDE0NiwicGF0aCI6Ii80NjA5NjE1Ny80MDcyMDE2NzMtYTRlZGE5OWUtYTUwZS00NDJhLWE2YTAtMTBmY2JkMDg2YjYwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA1NTU0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA0ZjAxZWIxNDlkMzQ4MmRhMzBmMTcwMWIzODY5MjM2ODc0YWE5YWI0NWNjMGJhZTg0YTY1NTZjOGE3ZTU3MzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.xPpQgg2fqP1yATcj0PvLNaG7TWVp0LKG78mcRkUcogc)
I can see that the serial data going to the logger is continued, but the file on the SD card does not contain any of the on-going 60s data logs. The analog data logs continue without issue, meaning the SD card is fine.
Here is serial data going in - the log stops at the start of the 4th row:
This used to work and I am a bit perplext as to why the serial loggin stops this way. I monitored all inputs and the ‘stop logging’ signal on Pin32 is not to blame here.
Has anyone experienced a similar issue with the V2.9 firmware, or is there a setting that I overlooked somehow?
Peter
The text was updated successfully, but these errors were encountered: