I am totally baffled at this point…

See the attachment which shows the code with embedded diagnostic messages and the corresponding output.

float input_ratio is declared as a global variable… this code is within a function

fuel_value is an integer and enters with a value,

I expect input_ratio to return fuel_value divided by 1023 (or around 0.6) but yet it returns blank?


Here's that pic, fwiw:


Perhaps if you read "How to use this forum - please read" at the top of this and every forum you will be less baffled about how to pose a question that gets answers from lots of helpful people. The ideas in there include having a meaningful subject line and NOT posting text as hard to read screenshots.


Integer division: 100 / 200 = 0.

Floating point division: 100.0 / 200.0 = 0.5.

Cheers, and sorry Steve...