holdingRegs[REG_HUM] = (int16_t)(10 * Humidity);
I need humidity between 0 and 100% and the temperature -40 to 105 i'm using sht85 (i2c protocol) and i want to send this in modbus
holdingRegs[REG_HUM] = (int16_t)(Humidity * 100);
float Humidity = holdingRegs[REG_HUM] / 100.0;
Are you writing both ends of the Modbus program?
How many decimal places do you want to preserve of the humidity and temperature readings?
yes , if i may ask if i have a negative value how it work ? for example -1.25i need two can you cheek my code cause i have trouble too display this in modbus software