My first Arduino project was to create a simple scale for my kegerator to keep track of how full it is. I followed some good tutorials and have an lcd shield successfully displaying the weight, but what I want to do now is convert that to a percentage. Example, a full keg weighs 161 pounds, and an empty keg weights 29 pounds. So I'm looking to have 29 pounds be 0 percent, and 161 pounds be 100%. Can anyone point me in a good direction to figure this out?

map()

How would you normally calculate the percentage; e.g. on paper?

Subtract the wait of the empty keg from the measured wait.

Now you have the weight of the content of the keg. Using your numbers, if the keg is full, it will be 161 - 29 = 132.

So you can divide the measured weight by 132 and multiply by 100 to calculate the percentage.