2020-08-10 08:00 PM
Hi,
The code that I used for my SensorTile is : https://bit.ly/2XU08G8 (Just please click on the GET Software - I use the code in the folder of Data Log).
The code is for USB log and SD card log. For the SD card, it needs to double tap the SensorTile to trig it. However, the USB log works exactly after turning on the device. As for my project, I need to disable its double tap and just work right after turning on the SensorTile and log data on the SD card, the same as its USB in the provided software.
I am wondering if please let me know how can I change the software to enable its SD card logging logs right after turning on the SensorTile without triggering it with double tapping.
I really appreciate your time and help.
Looking forward to hearing from you soon.
John
2020-08-12 08:06 AM
Hi John @RMojt.1,
it seems the link you posted is not right (on the other topic you opened the link points to the general page of the SensorTile, and not to a specific firmware).
Anyway, you should check where the acquisition starts by debugging with an Integrated Development Environment.
That start is now triggered by the double tap, you just have to change the trigger to a line of code after the initialization of the board.
If you need further help, please, provide me with the correct link to the firmware you are using.
hope this helps.
2020-08-12 08:20 AM
Hi @niccolo.ruffini ,
Thank you very much for your response.
The code that I used is here: https://bit.ly/2XU08G8 (Just please click on the GET Software - I use the code in the folder of Data Log).
The code is for USB log and SD card log. For the SD card, it needs to double tap the SensorTile to trig it. However, the USB log works exactly after turning on the device. As for my project, I need to disable its double tap and just work right after turning on the SensorTile, the same as its USB in the provided software.
I am wondering if please let me know how can I change the software to enable its SD card logging logs right after turning on the SensorTile without trigging it with double tapping.
I really appreciate your time and help.
Looking forward to hearing from you soon.
John
2020-08-12 08:31 AM
@niccolo.ruffiniI can't delete my another related post. So, I am wondering if please provide your answer here.
Thanks
2020-08-13 02:22 AM
let's figure this out together:
hope this was what you were looking for.
have a nice day.
2020-08-14 06:25 AM
@niccolo.ruffini
Hi Niccolo,
Thank you very much for your time and guide.
I could change it in a way that with a double tap it starts logging and doesn't stop with another taps and continue logging. However, the problem is that, it only record and close file whenever it detects another tap! I mean, if you start logging and don't close the file, it doesn't record the data!.
I want to change it in a way that when I double tap it, it start logging without being stopped after the first tap. Then, when my testing finished, it record data by turning off the SensorTile. I don't know how can I make it to close the file that be sensitive to the device shut down and not be sensitive to the second(even) double taps.
I am wondering if please guide me Niccolo..
Thanks so much,
John
2020-08-18 04:52 AM
we will try to work this out.
when you turn off the board the power is cut off, so it cannot save anymore (that is the reason the log started and stopped with the double tap).
so you have two options:
let me know if this helps you.
2020-08-20 08:06 AM
Hi @niccolo.ruffini
Thank you very much for your response.
Actually, I don't know how and where to use sync_f. However, I want to write in the same created file in every sample that is received and close the file. For this purpose, I defined a flag and insert it in the "For Loop" of "WriteData_Thread". The "DATALOG_SD_Log_Enable()" open a file and "DATALOG_SD_Log_Disable()" close the file. I tried it several times to save the file, but I wasn't successful. I a wondering if please help me how can I open, save, and close the same file for any sample that is received to gather all data. This secures, even by turning off the device, it records all data.
Link for code: https://bit.ly/2XU08G8
Thanks so much and looking forward to hearing from you soon.
John
2020-08-21 02:11 AM
Hi @RMojt.1 ,
If you set the flag in the initialization process, check if the file was opened correctly by setting breakpoints.
First thing is making sure that the flag is doing its job.
I'm sorry, I misspelt the function, it is f_sync. Here is a link that explains how to use it:
http://elm-chan.org/fsw/ff/doc/sync.html
So, if you use f_sync every time you write the file will be surely saved.
If you need help on programming with FreeRTOS you can check out this series of videos by ST that explains how to tackle these kind of problems:
https://www.youtube.com/watch?v=QGVAayFI5ZQ&list=PLnMKNibPkDnFeFV4eBfDQ9e5IrGL_dx1Q