Code:
// this is a 2d table to convert a/d counts to temperature in celcius.
// divide result by 10 (ex idx0=-35.1)
const int ad_to_celcius[256] = {
-351,-348,-344,-340,-321,-303,-284,-265,-246,-228,-209,-190,-171,-153,-134,
-115,-96,-78,-59,-40,-32,-24,-16,-8,0,8,16,24,32,40,48,56,64,72,80,88,
93,99,104,110,116,121,127,133,138,144,149,155,161,166,172,178,182,187,192,
196,201,206,210,215,220,224,229,234,238,243,248,253,257,261,265,269,274,278,
282,286,290,295,299,303,307,312,316,320,324,328,333,337,341,345,350,354,358,
362,366,371,375,379,383,388,391,395,399,403,406,410,414,418,421,425,429,433,
436,440,444,448,451,455,459,463,466,470,474,478,481,485,489,493,496,500,504,
508,512,516,520,524,529,533,537,541,545,550,554,558,562,567,571,575,580,584,
589,594,598,603,608,613,617,622,627,631,636,641,645,650,655,660,665,671,676,
681,686,691,696,702,707,712,717,722,727,733,738,744,749,755,761,766,772,778,
783,789,794,800,806,811,817,823,830,838,846,854,862,870,878,886,894,902,910,
918,926,934,942,950,961,972,982,993,1004,1015,1025,1036,1047,1058,1069,1079,
1090,1101,1112,1123,1145,1168,1190,1213,1235,1258,1280,1303,1325,1348,1370,
1393,1415,1438,1460,1460,1460,1460,1460,1460,1460,1460,1460,1460,1460,1460,
1460,1460};
Bookmarks