Start a new topic

Math with number

Hi,

 

I'm working on a meter and would like to display de voltage, amps and the total power in Watt.

I send two values with the Arduino to two number boxes. I have a third box and I would like to let the Nextion display do the calculations of the power, see the attached image.

How could I do this?

 

This is a part of the display:

image



P=U*I


1 person likes this

I know, but how do I enter the funtion in de Nextion Editor?

I have this now: n2.val = n1.val*n0.val

This is enterd in the (Touch Press Event(.), but I get a Error: Error: Invalid command:n2.val = n1.val*n0.val( Double click to jump to code)

so, check your code. The compiler tells you exactly what's wrong ...

when everything is typed correctly, it also works correctly ...

 

I bet, the solution can be found in space ... :-)

Login or Signup to post a comment