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

  1. Add the Celsius temperature source and a Math block to the workspace.
  2. Connect the Celsius value to input a.
  3. Enter the formula a * 9 / 5 + 32 in the F(x) field.
  4. 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.