Hey, i am currently making a capacitance measurement circuit, and i need to use the calculation below to find out the time constand (tau) :

Tau= -t
ln(1-(Vc/c))

I know all the values for Vc and V, all that varies is the t.
The t refers to time, so obviously it inuts into a positive number, i need to change it into a negative and then complete the calculation above.
at the moment i have got this:

Tau= (elapsedTime/(log(1-(ThreshH/5))));

i am not able to change the value "eleapsed time" to a negative number, but that isnt such a problem.

i am then outputing Tau into the "Serial.Print" and just getting 0?

The possible/probable errors are that you mix [b]int[/b] and ** **float** **
. Make sure all the variabes are float and make all your constants floattype, too (just to be safe) i.e. write 1.0 not 1.