2024-06-08 10:49 AM - last edited on 2024-06-28 01:17 AM by SimonePradolini
Hi everyone,
I have a STWIN.BOX (STEVAL-STWINBX1) and I have played around with the code examples in Python provided on the tfp-sns-datalog2 repository. The idea is to use this device to provide readings to a Raspberry Pi board and make some decisions based on the data.
I am not an expert in Python, but I coded a simple script to read the sensors using the repository, getting the hsdatalog_cli.py as an example, and using this data as input to the Raspberry Pi board.
The thing is, I can read the sensors only if I start logging (using the start_log method provided by the script hsdatalog_cli.py), and since the log has started, it will generate .dat files. So, every time I run the algorithm inside the Raspberry Pi, new .dat files are generated, and the file sizes depend on how long the board is running the algorithm.
I have tried to get data from the sensors without starting logging, but I have failed.
Is there any way of getting data from the sensors without generating the dat files?
Thanks in advance!
Solved! Go to Solution.
2024-06-12 12:44 AM
Hello @janco_tianno
DATALOG2 example is intended to log data and create datasets. As on today, it works only by saving .dat files on a host (Raspberry or PC) or on an SD card so there is no way to visualize data without starting logging.
Best regards
Simone
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
2024-06-12 12:44 AM
Hello @janco_tianno
DATALOG2 example is intended to log data and create datasets. As on today, it works only by saving .dat files on a host (Raspberry or PC) or on an SD card so there is no way to visualize data without starting logging.
Best regards
Simone
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
2024-07-17 02:22 AM
Hello @janco_tianno
We added the feature you requested in the upcoming FP-SNS-DATALOG2 v2.2.0. It should be online in 2/3 weeks.
hsdatalog_GUI will have a new flag to disable data saving on the PC/Raspberry. So, there will be the possibility not to save data and have it only live plotted.
Best regards
Simone
2024-07-17 01:15 PM
That would be awesome!
We could use the data from the sensors to train an AI model and still use the same structure to get real-time data without saving them.
Thanks for the support!
Best regards,
Kleber Silva.
2024-11-28 02:53 AM
how to save the file directly in an csv format instead of .dat format. Also, how to stream the data to add some detection thresholds for each sensor to generate alarm?
2024-12-02 02:10 AM
Hello @nvision
As already stated in my previous responses, DATALOG2 is intended for generating datasets efficiently and works by generating .dat only.
Then you’re free to convert the generated dataset in the format you prefer through the Python SDK we’re providing. CSV converter is already available there.
If you’re searching for a solution which is already managing threshold and alarms, I'm sorry but there’s no a ready-to-use firmware solution for STWIN.box.
Maybe you can build your custom firmware and software solution on top of DATALOG2 and Python SDK examples.
Best regards,
Simone
2024-12-04 03:27 AM
Is there any option to save the fft data? Right now only the time series data is saved, right ?
2024-12-04 08:57 AM
Hello @nvision
DATALOG2 is always saving raw data as they come out from the board, so only time series.
You can enable an FFT live view by using the hsdatalog_GUI.py and plot spectrograms by using hsdatalog_plot.py.
Best regards,
Simone