Thursday, June 25, 2009

Scales



Just in case you think I am cribbing, these are my workings on two little memo notes that got me to the calculation for the temperature value I mentioned yesterday.

int Sensor0temp = ((reading0 * 4.883)-600)/10

It was an interesting exercise as I do not often disturb the part of my brain that deals with maths. I am afraid it may have required bandages after the session of prodding I put it through.
If I were a little smarter I could have got it to display the temperature to 0.1 of a degree, but in all decency I had to let the poor thing crawl back under the bed and rest.
I found the problem easier to follow with the three scales in mind, one for the controller, one for the sensor and one for me. It helps one conceptualize the problem of how to get a given value on one scale to mean the same thing on another. It also helped to try and get assistance from other members of the family. Just trying to describe what you are attempting to do makes things clearer, too.