A datatype in C/C++ which stores a single-precision floating point number.
0
votes
4answers
73 views
Float arithmetic vs. int arithmetic - is there any power penalty?
It is widely known that float arithmetic takes longer (that is, eats more cycles) than fixed-point (or integer, or bitwise arithmetic), and that surely is something to consider for speed- and ...
1
vote
1answer
45 views
Assembling a float from an array of bytes
I would like to convert an array of bytes, received from serial, to a float.
Let's consider this exemple. I'm sending 0.12 byte-wise from an Android application. The conversion from float to array of ...
2
votes
1answer
39 views
Store floats in and reading them from flash
How do I store floats in flash and how do I read them from there? (I need a look-up table for pairs of float values.)
The storing part doesn't seem to be so difficult as this compiles:
PROGMEM float ...
1
vote
1answer
169 views
float precision in arduino
I am reading a string which i have to convert into a float with a maximum of precision.I didn't want to use toFloat() function since it make a truncation so i made my own code.
My problem is that the ...
1
vote
1answer
135 views
Read data from SD
I have logged some data in my sdcard/FAT32 (format).
I can read and display them on the serial monitor but additionally I want to use these data as float.
Here is my code:
byte index = 0;
...
0
votes
1answer
52 views
Serial, Numbers sent as Floating Point and Characters are different at 1e-8 level
I have some code that generates random numbers on the Arduino, it then sends these random numbers firstly, using Serial.print(float data,int lenght) and as a floating point number using the following ...
0
votes
0answers
20 views
Local variables scope anamoly
I have this simple function that produces 2 float values sum and product from which i calculate another varaible NodePrio.
I had the value of NodePrio coming wrong so i decided to put in some console ...
0
votes
1answer
197 views
Saving data in a globally declared float array
I'm trying to send 60 float values via serial. Numbers are provided by an accelerometer and saved in a 240 bytes-long array. The array is sent to a function and these values are then copied in a ...
0
votes
1answer
290 views
Sending a floating point number from python to arduino
I am trying to send a floating point number from a python script to an Arduino. I am not sure how to do this, especially in a pythonic way.
A little bit of research brought me to this very similar ...