View Single Post
  #1   Spotlight this post!  
Unread 01-14-2015, 12:08 PM
Sparkyshires Sparkyshires is offline
Registered User
AKA: Michael Shires
FRC #0384 (Sparky)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2006
Location: Virginia
Posts: 226
Sparkyshires is an unknown quantity at this point
Accessing Joystick Axes in Command-Based Robot

Hello all,

This is my first time programming in the command-based template, and I've made it pretty far until I've hit a dead wall - I can't send joystick control to the motors. As the motors are controlled in the subsystem class, and the joysticks are instantiated in the OI class, how can they communicate to each other? I'm just trying to do a basic "if button is pressed, send stick1 y-axis to motor output" with a drive command, drivetrain class, and joystick variable.

Any help is appreciated, thank you very much!
__________________
"Measure with a micrometer, mark with chalk, cut with an axe."
Reply With Quote