This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error in calculations

Hi guys

I'm having trouble to get this code works. I want to multiply and divide and I use the following code:

valor1=ADC0;
valor1=valor1*2;
valor1=valor1*12;
valor1=valor1/5;
valor1=valor1/4095;

with valor1 as float but the variable valor1 never is the right number. what is wrong?? can be another way to do this multiplication:

valor1*2*2.42/4095

Thanks

0