title: Assigning percentage values to a range of values
body: <p>I'm writing an arduino sketch and my sensor is giving values between 400 and 1023.  I want to convert these values into percentages where 400 is 0% and 1023 is 100%.  I've been messing around with various equations, but my algebra's a bit rusty.  Is there an easy way to do this in C?</p>