Convert Celsius to Fahrenheit
This example converts a temperature from degrees Celsius to degrees Fahrenheit with the Math block.
Required blocks
- A sensor or input block that provides the temperature in °C
- Math
- An optional display, variable or output block
Program flow
Temperature in °C → Math → Temperature in °F
Configuration
- Add the Celsius temperature source and a Math block to the workspace.
- Connect the Celsius value to input
a. - Enter the formula
a * 9 / 5 + 32in the F(x) field. - Connect the
F(x)output to the block that should receive the Fahrenheit value.
Example calculation
For an input of 20 °C, the formula calculates:
20 * 9 / 5 + 32 = 68
Result
The Math block returns 68 °F. It recalculates the result whenever the Celsius input changes.