Quantcast
Channel: Calculations within node-red
Viewing all articles
Browse latest Browse all 2

Calculations within node-red

$
0
0

@knolleary wrote:

Hi @vinisz

The Function node is probably the easiest place to start with this sort of thing.

The node uses JavaScript and there is a good guide on the built-in Math object here.

And more specifically, the Math.pow() function.

With that in mind, a Function node with the following code should do what you want.

msg.payload = Math.pow(10, (msg.payload-109)/32);
return msg;

Read full topic


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images