2019-06-21 09:29 AM
Hey!
I would like to create a log and store it so i could access the information later, for example for a device the monitors how many people go in or out a store and at what times.
It would be helpful to store it in a sd card or the boards memory itself so i could just connect it to a computer and check the time
Solved! Go to Solution.
2019-06-25 06:40 AM
Hi @pmppires,
I suggest you take a look at some of the SD Card examples in the cube firmware on how to create, read and write files using FatFS on SD cards. See if you can find whate you're looking for in that respect - Then we can move on to maybe displaying some of that in a TouchGFX application.
It sounds to me like you will be having some tasks sampling various sensors to detect people (maybe just one sensor). You will then communicate this event to the GUI task through an OS Message queue which we will pick up in Model::tick() and then write to the log file on the SD card. In the same event, you can update your application to display this new value.
Check the sticky in this forum for how to integrate your application with hardware peripherals.
Let me know!
/Martin
2019-06-25 06:40 AM
Hi @pmppires,
I suggest you take a look at some of the SD Card examples in the cube firmware on how to create, read and write files using FatFS on SD cards. See if you can find whate you're looking for in that respect - Then we can move on to maybe displaying some of that in a TouchGFX application.
It sounds to me like you will be having some tasks sampling various sensors to detect people (maybe just one sensor). You will then communicate this event to the GUI task through an OS Message queue which we will pick up in Model::tick() and then write to the log file on the SD card. In the same event, you can update your application to display this new value.
Check the sticky in this forum for how to integrate your application with hardware peripherals.
Let me know!
/Martin