Why won't this work?
Data6 is a variable that ranges from 0 to 127
Light = (Data6/127)*100
I get 0 from 0-126 and 127 gives me 100.
I had a similar issue with another math problem and I'm guessing they are related. I had to use a lookup table to solve this one and if I can get rid of the lookup table it would save me some code space.
T=((DATA4*9/5)+32)*10
I know you can't use decimal points when multiplying but I think you could multiply by 10 and then use the //10 to get the remainder but in this case I'm just getting 0.
Bookmarks