Hello, I want to remove decimals after my original number in the monitor. Is there any way I can easily integrate it with this code:
const int sensorPin = A0;
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorVal = analogRead(sensorPin);
float voltage = (sensorVal / 1024.0) * 5.0;
float temperature = (voltage - .5) * 100;
Serial.println("Degrees Fahrenheit:");
float ftemp = (temperature * 9 / 5 + 32);
Serial.println(ftemp);
delay(1000);
}
My serial monitor only displays temperature values with two decimals after it. Help is appreciated!