Go Down

Topic: Arduino Uno ds18b20 and sure 2416 dor matrix display (Read 2 times) previous topic - next topic

danielb

jhon thank you so much now with your details I've understand the meaning of it

I've changed the code here

float temp = sensors.getTempCByIndex(0);

Serial.println(temp,DEC);
      char buffer[10];
   //     itoa(temp,buffer,10);
      dtostrf(temp, 5, 2, buffer);
      ht1632_putchar(6 , 8, buffer[0]);
      ht1632_putchar(12 , 8, buffer[1]);
      ht1632_putchar(18 , 8, buffer[2]);
      ht1632_putchar(24 , 8, buffer[3]);
      ht1632_puttinychar(32 , 8, 'o');
      ht1632_putchar(37 , 8, 'C');
      delay(150); 

now works perfectly

many thanks

johncc

Great!!  Then we'll leave it at that for now  ;)

PaulS

You are asking for 5 characters in the output, with two  digits after the decimal point, so something like 23.45. Then, you are showing 4 characters on the LCD (23.4). Why?

Go Up