A newbie here so go easy eh...
Just wanted a bit of advice on calculations and the hierarchy inside a function.
I am trying to get a program working that calculates the potential difference across a wheatstone bridge circuit.
The formula for this is
Vb = Vin * R2 Rx
-------- - -------
R2 + R1 Rx + Rs
My code for this function is
float potential (float R1, float R2, float Rs, float Rx)
return( 30 * R1 / (R1 + R2) - Rx / (Rx + Rs));
Where 30 = Vin
But the calculation is not working, no errors just not the output that is correct.
Any help guys?