I'm embarassed to post this question here. But I am not able to calculate a common divider / multiplier operation. I'm stuck and I hope that someone can help me. I can't figure out that strange behaviour:
Here some tryouts. Result should be 35,98, or better 36 (%).
Serial.println((2913/8096)*100); => results in 0
char t; float i = (2913/8096)*100; sprintf(t, "%d", i); Serial.println(t); => results in 0.
char t; int i = (2913/8096)*100; itoa((2913/8096)*100, t, 10); Serial.println(t); => results in 0.
I've changed i to be float, int, long. Result is the same.
What am I doing wrong?! This is incredible I cant find my mistake :~
Thanks for your help guys