Hi,
I am sorry to keep on pestering you guys. Arpita, I tried Ian's way of
using const float test[250], which works fine but in my program I seem to
have the following problem:
int compute_stove_temp(int t)
{
temp2=t*0.0129; // converts to 3.3V scale
rt=((3.3/temp2)-1); // Rt div R =( (3.3)/(input) -1 )
stove=0;
for(q=0;q<=251;q++)
{
if(rt>=RtR[q])
{stove=q;} // if ratio matches then temperature =
q(location in the array)
else
{stove=0;}
}
return stove;
}
For some reason, the value stored in' stove' is always 251 no matter what
the input is. The computation before the for-loop works just fine.
Thanks for all your help,
Avdit
On Wed, Jun 25, 2014 at 3:31 PM, Arpita Agarwal <