Thread: General Q's
View Single Post
  #7   Spotlight this post!  
Unread 23-02-2005, 01:10
thoughtful's Avatar
thoughtful thoughtful is offline
Registered User
FRC #1219 (Emery Iron Eagle)
Team Role: Alumni
 
Join Date: Nov 2003
Location: Toronto,Canada
Posts: 291
thoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to behold
Re: General Q's

Quote:
Originally Posted by amateurrobotguy
In order to be able to use a victor to control my motor, wouldn't I have to recallibrate it so it can go negative and be on a -1->1 scale as compared to 0->255?
If I decide to hook up a spike, I am assuming that it will be hooked up in a similar fashion to the victor.

You were talking about digital inputs before, a digital input is just anything tht return 0 or 1 (not -1). I know the relays has three states tht because u can actually have 3 states by having no signal, positive signal and negative signal. However, for you purpose lets think about the joystick button as a digital input since its 1 when its pressed and 0 when its reverse. Your code should be something like this:

Code:
If p1_sw_aux1==1
{ 
pwmX=255;
}
else if p1_sw_aux2==1
{
pwmX=0;
}
else
{

}
Note*: My syntax might not be correct, this program will not work properly is you press both buttons and the same time.
__________________
.:Bringling Brains to Life:.

03,04,05-Team 1219 Captain
2003 Rookie all Start @ GTR
2005 Galileo Semi-Finalist & Alliance captain
06-Team 1219 Mentor
2006 Radio Shack Innovation in control @ Waterloo