allowing the ide to calculate

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html

You can program the formula into the controller if it does not rely on super accuracy, but you cannot just write a formula in the IDE and make it work.

You need a controller to do the work.

Use the serial monitor on the IDE to input and output your data.

Tom.. :slight_smile: