Shop OBEX P1 Docs P2 Docs Learn Events
converting numbers — Parallax Forums

converting numbers

ArchiverArchiver Posts: 46,084
edited 2000-09-28 16:58 in General Discussion
Hello all: I am using the sharp GP2D02 it outputs a large number for close
range and a small number for far range detection. 225 for minimum
distance,and around 75 for maximum distance. How can I flip this number
sequence so that my program can display a high value for long distance,and a
small value for short distance?
I had thought of a lookdown table or some such,but boy that would be messy
and take up a lot of wasted program space.
IS there a way to do this with a math equation somehow? Ultimately I then
wanted to convert the number sequence into some human readable form for LCD
display output. a simple inch system 1 to 24 inchs since that is about the
maximum range of the sharp
Thankyou everyone.

Sincerely
Kerry
Admin@M...
WWW server hosting
[url=Http://mntnweb.com]Http://mntnweb.com[/url]
Binghamton online Webcam [url=Http://MntnWeb.Com/bing.htm]Http://MntnWeb.Com/bing.htm[/url]
CHRISTMAS Web Page [url=Http://mntnweb.com/xmas.htm]Http://mntnweb.com/xmas.htm[/url]
--So you think you need more memory... the LEM went to the moon on 16K,how
much do you REALLY need?

Comments

Sign In or Register to comment.