if i write float TempC = 2250;show 22500 °Cin serial monitorshow the temperature in this way : 19.4375000000
I think the problem is the decimalI must divide 19 from 43 without the dot ( or comma )put 19 into a buffer and the 43 into another buffer then show itRight thanks
how I should change it ?
int temp = sensors.getTempCByIndex(0);
// returns temperature in degrees C float getTempC(uint8_t*); // returns temperature in degrees F float getTempF(uint8_t*); // Get temperature for device index (slow) float getTempCByIndex(uint8_t); // Get temperature for device index (slow) float getTempFByIndex(uint8_t);
( I think I must change sometingh here but how ? )
Your buffer will need to be larger, and you'll need to use ftoa(), instead of itoa(). After that, you'll need to put more characters to the display.
error: too few arguments to function 'char* dtostrf(double, signed char, unsigned char, char*)'