How to write data with FS_Write() to sd card

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello community,

   

I am trying to store my measured data to a sd card. I am using PSoC 5lp. For the storage purposes I checked the emfile example project. It is working, but there they do it this way:

   

.....

   

FS_Write(pFile, "0123456789", 10u)

   

So they write 0123456789 into a file. It is working, but how do I manage to store variables. I want to store measured data and currently I have no idea how to do it.

   

Thanks in advance for helpful comments.

   

Alex

0 Likes
3 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Look at 'sprintf' which is like printf, but allows you to store the result in a char buffer.

0 Likes
Anonymous
Not applicable

thanks, now it is working !

0 Likes
Anonymous
Not applicable

Hey ! Can you help me? I m also facing the same problem. How did you solved it? If possible share with me an example code?

0 Likes