View Single Post
  #1   Spotlight this post!  
Unread 07-02-2006, 20:47
Superstitions's Avatar
Superstitions Superstitions is offline
Gadget Wizard
FRC #0039
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Gilbert AZ
Posts: 13
Superstitions is an unknown quantity at this point
change pwm range preserve input sensitivity

I am using analog input (pot) from the user console to control a motor speed through a victor speed control. The analog gets converted to PWM_1= 0 to 254. I want my PWM (PWM_2) output to the victor to be 100 to 254. We are controlling ball distance by changing speed of ball shot with victor to a motor. I want input to this to be from the pot and want to presrve the ability to be able to go in reverse a little if the shooter gets jammed. I have come up with a formula for the conversion:
(PWM_1*154/254) + 100 =PWM_2.
My questions are
1) will this be excessively taxing on the RC program
2) is this the best way to make full use of the 0 to 5 volt analog input
3) do I need to use the terms PMW_1 and PMW_2 or can I use a term (PMW_1 temp)
Thanks in advance, please take it easy on me I am just starting out.

Last edited by Superstitions : 07-02-2006 at 21:49.