Writing binary data to SD card #1066
Replies: 3 comments
-
Posted at 2021-03-03 by @fanoush not solution but maybe workaround or thing to check - you can retype the array as Uint8Array in place (they share same memory) and see how that one gets written or check how it compares to 'bad' file you have.
or even check |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-03-03 by AkosLukacs Much better, file length matches the Thank you! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-03-03 by @gfwilliams Yeah, the issue is that All you need to do to write is |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-03-03 by AkosLukacs
I'm trying to write 16bit integers to a file, but didn't got the result I was expecting. For example:
\xFF
is 255, ok for one byte.1111
is0100 0101 0111
in binary, andW
is 87 character code,0101 0111
binary. Looks like the lower byte of the 16 bit integer is saved.*
is 42, ok.My question is: Looks like saving typed arrays directly is not supported. Will it be, or what would be the best way to save this data as fast and efficient as possible?
Board is a Pixl running 2v08.188 (and of course shouldn't call a binary file
.txt
)Beta Was this translation helpful? Give feedback.
All reactions