View Single Post
  #4   Spotlight this post!  
Unread 12-02-2005, 23:05
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: coding a potentiometer

Quote:
Originally Posted by Mark McLeod
For the RC dashboard screen you'll have to scale the pot (0-1023) to the range (0-255) and set one of the User_Byte's (1-6) to that value.
Or use two user bytes:
Code:
    User_Byte1 = value >> 8;
    User_Byte2 = value & 255;