Quote:
Originally posted by Joe Ross
I think you would be better off with 255 - x max 254, unless you guarantee that x is never greater then 254 before that.
This will help to keep from outputing two 255's in a row which will reset the data packet and cause all kinds of interesting things to happen.
|
The guarantee comes from Innovation First's code which will not allow a reading of a joystick or other pot to become more than 254.
254-x works fine, as shown in this table (in monospaced type font):
x value in :...0........127.........254 (max)
254 - x....: 254........127...........0
255 - x....: 255 ** ...128...........1