And if I may add, to prevent negative results, a limit test for the two sides of the range will guarantee the result will be 0-127.
Ioannis
Type: Posts; User: Ioannis; Keyword(s):
And if I may add, to prevent negative results, a limit test for the two sides of the range will guarantee the result will be 0-127.
Ioannis
I 'd use what Henrik has posted and maybe with a smaller multiplier, say 3000. Keep your ten average pile. Then Henrik's lines will give you directly the result for your digital pot.
'Main...
Also the program runs one time. Is this what you want?
And on the third paragraph of your post, you say that the sensor gives a value of 92-466 and then 92-364. Which of the two is true?
...