View Single Post
  #2   Spotlight this post!  
Unread 20-03-2013, 07:00
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: activate second-function motor with joystick

Joystick j = new Joystick(1)

if(j.getRawButton(1)) //a on the xbox
{
pwm.set(1);
} else {
pwm.set(0);
}

you shouldn't use PWM, you should use what they physically are... it helps the system send the data in the correct format.

also, your robot doesn't have only one motor controller setup to your chassis there has to be atleast two or it won't turn. Ask your electrical team for the correct ports on the PWM, and dont spam 0's at the end of the constructor as that will error out
Reply With Quote