Virgülden sonra Tek basamak float

Başlatan veliusta, 12 Temmuz 2014, 01:34:36

veliusta

float temp;
int tempPin = 0;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  temp = analogRead(tempPin);
  temp = temp * 0.48828125;
  Serial.print("SICAKLIK = ");
  Serial.print(temp);
  Serial.print(" *C");
  Serial.println();
  delay(1000);
}



Örnek: 33,8 *C
Nasıl oluyor

atomx


Serial.print(temp,3)

Hatirladigim kadariyla boyle olmasi lazim
Hüseyin TECER

veliusta

#2
Olmadı.

Tamam oldu sağol.
  lcd.print(SICAKLIK, 1);