Questions tagged [float]

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

7 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
1answer
57 views

Can not receive data from python code

I want to send 4 float numbers from a python code to an Arduino, I was trying to send it via serial and i have some problems here is my python code: import time import serial import struct data = ...
0
votes
0answers
49 views

ESP8266 computtion error

The related hardware diagnostic could be found here: ESP8266 not working with MPU 6050 over wire library and I2C .But I'm not so sure it's a hard ware issue any more because I got the reading for ...
0
votes
0answers
36 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
245 views

Convert float to hexadecimal value

I am trying to convert a float value to a 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() { ...
0
votes
0answers
134 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
1k 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&...