View Single Post
  #32   Spotlight this post!  
Unread 12-12-2011, 12:35
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Team 254 2011 FRC Code


Would this work?

- Apply joystick commands -127 to 0 to 127 and measure the Vic's output voltage1 for each one.

- Normalize those measured voltages to the (floating-point) range -127.0 to 0 to +127.0

- From this data, for each desired whole number output (in the range -127 to +127), determine (by simply looking at the measured data)2 the integer value required to come nearest to the desired output. Put these integers into an array (-127 to +127).

- The index of the array is the output you want (-127 to +127), and the value stored at that index is the value you should command. No lookup search or interpolation required.



1 stalled? or free? probably makes a difference. not sure whether you want average or rms voltage.

2 or just let a spreadsheet do it for you