xod/units library contains a few nodes for converting some popular units. For example, Celsius to Fahrenheit, degrees to radians and so on.
One of these nodes (
c-to-f) is already on the patch and the program shows temperature in Fahrenheit.
Let’s improve the program to see a temperature in Fahrenheit only when the button is pressed.
R with the second pin of
Great! However, we still get a “C” on the LCD, even when the temperature converted to the Fahrenheit. Let’s fix it.
PRS to the new
"F" to the
T pin, and
"C" to the
R with the latest pin of the
As was mentioned, the
if-else node can work with numbers and strings depending on the incoming value type. The
"C" values you bind have to be put in quotes so that XOD knows what data type do you mean.
See the generic nodes guide for better understanding.