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

converting numbers(GP2D02)

ArchiverArchiver Posts: 46,084
edited 2000-09-29 00:50 in General Discussion
> Subject: RE: converting numbers
>
> Um, how about:
>
> y = 225-x
Yes
> So at 225, y = 0 an at 75 it equals 150. Then you could scale it up as
> you like. Assuming it is linear, you'd use y=mx+b where m is the slope
> and b is the zero offset:
No it isn't. One experimenter said squaring the output number
made it more linear.
> y=m(255-x)+b
>
> Does that help?

Comments

Sign In or Register to comment.