I think I figured out why that is not accurate... MAT is counts and your data tracing with C tepm. It need a lookup table.
Code:
;* A/D degrees A/D
;* counts C Inv
;* ------- ------- ---
;* 255 -40 0
;* 251 -30 4
;* 250 -25 5
;* 247 -20 8
;* 245 -15 10
;* 241 -10 14
;* 237 - 5 18
;* 231 0 24
;* 225 5 30
;* 218 10 37
;* 209 15 46
;* 199 20 56
;* 189 25 66
;* 177 30 78
;* 165 35 90
;* 152 40 103
;* 139 45 116
;* 126 50 129
;* 114 55 141
;* 102 60 153
;* 92 65 163
;* 81 70 174
;* 72 75 183
;* 64 80 191
;* 56 85 199
;* 50 90 205
;* 44 95 211
;* 39 100 216
;* 34 105 221
;* 30 110 225
;* 26 115 229
;* 23 120 232
;* 21 125 234
;* 18 130 237
;* 16 135 239
;* 14 140 241
;* 13 145 242
;* 12 150 243
;* 0 200 255
Bookmarks