Using of Float function in map function

Need Help!!

I want to convert pressure transmitter signal in to display the pressure in Kg/cm square up to two decimal. I do not idea how to use float function. my small idea about the coding is:-

const int analogInPin = A0; int sensorValue; int outputValue; void setup () { Serial.begin(9600); } void loop (){ sensorValue = analogRead(analogInPin); float outputValue = float (sensorValue, 0.496, 3.56, 0, 7); Serial.print(" KG/cm2 "); Serial.println(outputValue); delay(500);

kindly corrected the same

You can't map a float because float is infinite. Perhaps try to search for a formula for your equation.

any idea about the formula

map floats function. (Yay Google).

sorry i do not any idea that How to insert my value in :-

double mapf(double val, double in_min, double in_max, double out_min, double out_max) { return (val - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; }

and where i will to place these string?

any help!!!!!

If you don't know that, just keep scrolling through examples and Howto's. That is TO basic...

"These string" is a function declaration.