Transform a range?

Is there a way to transform a whole range of numbers. Something like a map() function in arduino.
For example to transform the numbers from 234 to 833 into a range from 0 to 100.

I guess MAP will not work and I can’t find ANY documentation or examples of SCALE.

Thank you!

I believe you can do this most easily though a JavaScrip(JS) transform:
For example, here a simple rule to translate from Fahrenheit into Celsius:

	return (i-32)*5/9;

You have to save this as a file in the transformation folder.


You may want to check out this:
Documentation plus examples, kindly provided…

1 Like

I found that, bu as I understand those examples it transforms a renge of numbers into a string… not into a nother range.

Unless it would work like this: ?


The SCALE transform is unlikely to do what you want, but I wanted you be aware of where to find the docs in case you need it again. For what you need, you will either need to write a rule or use the javascript transform as indicated above.