View Single Post
  #1   Spotlight this post!  
Unread 12-12-2015, 11:33
Bluejackets's Avatar
Bluejackets Bluejackets is offline
Bluejacket Robotics
FRC #5464 (Bluejacket Robotics)
 
Join Date: Dec 2014
Rookie Year: 2015
Location: Cambridge Isanti HS
Posts: 110
Bluejackets is a splendid one to beholdBluejackets is a splendid one to beholdBluejackets is a splendid one to beholdBluejackets is a splendid one to beholdBluejackets is a splendid one to beholdBluejackets is a splendid one to beholdBluejackets is a splendid one to behold
Question how to toggle motors in c++ using buttons

hey guys! I am new to C++ and I am told to try to get motors to run by pushing button 1 on the joystick... I am having issues doing that... anytime I try doing it it runs like tank drive... I try using an if statement like below.

if(stick.GetRawButton(1)){
talon.Set(1);
}else{
talon.Set(0);
}
if(stick2.GetRawButton(1)){
talon2.Set(1);
}else{
talon2.Set(0);

thanks for your time!
bluejacket robotics!