Part of my current project, is to clean up some of my pBasic code.
I want to convert 0-255 to a percent of 255.
I have a fuel sender that shows me FULL at DEC 255 and EMPTY at DEC 000.
The variable is FUEL
I am trying [fuel = 100/(255/fuel) . I would like 128 to show me 050 or 50%.
I know I am having integer math problems. I need another method of making this conversion.
Anyone have a suggestion? Sorry, I was surfing during the 60's in So Cal during my high school math classes and my major @ university was music...