Go Down

Topic: Serial print of arrays (Read 1 time) previous topic - next topic

Professor Chaos

I believe Mikal Hart's Flash library supports storing float arrays in Flash memory:

http://arduiniana.org/libraries/flash/

Pero_2912

So,if I got you right, I should save my Theta as a some compatible type in Flash, in.e. signed long, and after reading convert it to float. But how to save my values in range from 0 to 1 from truncating and rounding? Maybe to multiply them with in.e. 100000 before saving? Ok, this could work.. thanks man

AWOL

Quote
So,if I got you right, I should save my Theta as a some compatible type in Flash, in.e. signed long,

Not sure what you mean here.
What's wrong with
Code: [Select]
PROGMEM float Theta [1001...whatever] = {3.45,6.27};?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pero_2912

well, libraty pgmspace.h does not support float type. And I could not find any function that reads it properly.. So i thought, before saving, adapt my data to intiger type, and the return it float, after reading.

AWOL

So, read it back as a type you can read, and cast the result to float.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up