BC = {(Iout*3600/ 2000)*100%};
Because it's not valid C/C++?
Where are you entering this?
In loop
You mean inside the loop() function in your arduino sketch. Ok. In your Arduino sketch, you must use only valid C/C++.
Braces {} are not used in formulae in C/C++.
% is the modulo operator and requires a number to the left and another number to the right.
If by % you meant percentage, you cannot use % like that in C/C++. Simply convert it to a fraction. In this case, since the value is 100% == 1.00, you can remove it because it has no effect on the result.
To summarise: you need to learn to code in C/C++.
Hi, @natanajithg
Can tell us in words how you want your equation to work?
What are the { and } for?
What is the 100% for?
What is the application?
Thanks.. Tom..
Get rid of the curly brackets { }.
You also can't use % in the expression. Probably remove that too.
Since the math is fixed can it not be done outside the code
3600 / 2000 = 1.8
1.8 * 100% = 1.8
all in all
float BC;
BC = lout * 1.8;
If your real formula uses more variables you have to post the real formula with all variables
best regards Stefan
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.