View Single Post
  #4   Spotlight this post!  
Unread 14-01-2015, 21:44
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Single motor 2015

Ah. So to echo it back to you, it sounds like you want two buttons on the gamepad, one forward, one backward.

In begin, you need to Open the motor and save the refnum with a name. In TeleOp, where the joystick Get has already read the buttons, drop an Index Array node, grow it and wire up the button indices. There are really three conditions for the motor. You either run the motor forward at a speed, backwards at a speed, or you leave it off with a speed of zero.

The attached image shows how the buttons 0 and 1 are choosing any of three speeds and updates the motor controller.

Greg McKaskle
Attached Thumbnails
Click image for larger version

Name:	From Clipboard.PNG
Views:	38
Size:	3.8 KB
ID:	17849  
Reply With Quote