Questions tagged [float]

A datatype in C/C++ which stores a single-precision floating point number.

5 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
25 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
0answers
35 views

How to compare an incoming byte from cool terminal as modbus hex value and compare it with a predefined value in set in the program?

My Input from Cool terminal is 05 03 00 01 00 02 94 4F I should be able to read this input 05 03 00 01 00 02 94 4F compare with the same(05 03 00 01 00 02 94 4F). If the incoming value(05 03 00 ...
0
votes
1answer
27 views

Convert Float to hexadecimalValue

I am trying to convert float value to 4 byte hexadecimal value. For example my input is: 58.5 My expected output is: 426A0000 or like 0x42 0x6A 0x00 0x00 My program is: void setup() { Serial....
0
votes
0answers
89 views

How to store an array of doubles? As array of doubles, Strings or const char *? Then convert back to use?

This seems like an old, solved problem, but I can't find any simple answers. I'm reading latitude and longitude data as Strings from a file (about 50 points), but they are really double float numbers. ...
0
votes
0answers
645 views

How to transmit Float sensor values via NRF24L01 module?

I'm trying to figure out a way to transmit four sensor values: Voltage, Current, Power and consumption but I'm unable to do that. Yet, my syntax is correct... what am I missing? #include <SPI.h&...