[SOLVED] Temperature in Whole Number

something like this:

tempF = tempSensor.temperatureF();

int wholeNumberTemperature = floor(tempF + .5);

Particle.publish("temperature", String(wholeNumberTemperature), 60, PRIVATE);

I cannot recall if you need to:

#include "math.h"
4 Likes