So I am using an Atmega328p and a MCP9808 to take some i2c temp values. Im running it to my computer and viewing it in termial via USART.
Im getting the correct values for Celsius degrees (it shows 00022, which is around 71 degrees which is correct for my room).
However when I try to convert to fahrenheit I get values of 00054 which is def. not correct.
This is the formula im using:
float fahrenheitConvert(uint16_t celsius) {
float fahrenheit;
fahrenheit = celsius*(9/5) + 32;
return fahrenheit;
}
celsius is simply a uint16_t
value called "Temperature" in the main program (Which is what is printed out through serial just fine). Am I missing something? This seems like it should be a simple conversion?