Skip to main content

Questions tagged [float]

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

0 votes
2 answers
156 views

I want to design an Arduino Uno/Nano library (an alternative to floats that uses less RAM) that uses a minimum of code space after compilation. Is there a (not too complicated) way to calculate or ...
Christophe's user avatar
1 vote
1 answer
231 views

I need to interface an ATTiny88 MCU configured as an I²C slave with a Raspberry Pi configured as an I²C master. I may be using the wrong approach, but I have a structure consisting of four different ...
LesRhorer's user avatar
  • 115
1 vote
1 answer
349 views

i want to ask, how to get correct float value from uint32_t or long variable is devided by 10?? long var3 = 1139399025; int a = 3; int b = 10; void setup() { Serial.begin(9600); Serial.println((...
mukhlas's user avatar
  • 11
1 vote
1 answer
284 views

#include <Arduino.h> #include <WiFi.h> #include "WiFiManager.H" #include <HTTPClient.H> #include "ESPAsyncWebServer.h" #include <AsyncTCP.h> float version =...
jay's user avatar
  • 35
2 votes
1 answer
1k views

I want to use snprintf() to format floats to a string. I know the "normal" version of Arduino's avrlibc had all the float-formatting code removed to make it smaller. I also know that at some ...
Bitbang3r's user avatar
  • 561
-1 votes
1 answer
705 views

I have noticed that the parseFloat() function returns decimal numbers, but only up to 2 decimal places. Would it be possible for it to return the numbers with more decimal places? In case we need more ...
Libegria's user avatar
-2 votes
1 answer
851 views

i am transmitting sensor data from my atmega328p to my esp8266. The Sensordata has 3 decimal places. The esp8266 sends this data to my pc and there I see only two digits. This is because the data is ...
kaan's user avatar
  • 1
0 votes
3 answers
1k views

Im having trouble in sending float number and multiple float numbers. Im currently working on project matlab and arduino mkr1000. The situation is that i want to send float number and multiple float ...
haniff derani's user avatar
1 vote
1 answer
4k views

I am trying to convert 1.06 to 106 by multiplying by 100 but the answer comes 105, I do not know why. Variable ver can be any decimal in this format x.xx float ver = 1.06; int vers = ver * 100; vm[0] =...
Shahreza's user avatar
  • 165
5 votes
1 answer
2k views

I have the following sketch: void setup() {} void loop() { float af = 4294967040.0; float bf = 4294967240.0; double ad = 4294967040.0; double bd = 4294967040.00001; Serial.println(af); ...
LukasFun's user avatar
  • 295
2 votes
1 answer
1k views

I'm trying to send the temperature value from the DHT sensor to a raspberry pi through I2C. Which is the best way to do it?. The temp value is a float, and I think I have to convert it to byte and ...
Guille's user avatar
  • 123
1 vote
0 answers
81 views

I'm trying to execute a math of analog read but I get some weird result.. I searched about int and floats but didn't understand.. My code is : #include <SevSeg.h> SevSeg sevSeg; int bitsChange ...
m sayed's user avatar
  • 11
1 vote
1 answer
180 views

Good day everyone, forgive me for the shabby drawing I am just panicking, why my float switches are suddenly undetected by my Arduino mega. I've tested all the float switches one by one to confirm if ...
princessbubbles15's user avatar
0 votes
2 answers
229 views

I'm using a gyroscope, which returns angular velocity in floats. I'm trying to use this data with the arduino mouse library. The move function requires a signed character. I'm not what the best way is ...
Zhelyazko Grudov's user avatar
0 votes
2 answers
1k views

I am trying to convert a floating point number to an integer, but it seems like the conversion is not working properly. I am using the math library to calculate the power of 10 based on the number of ...
DuluthIsSuperior's user avatar

15 30 50 per page
1
2 3 4 5 6