Quote:
Originally Posted by WilliamFRC4065
Coming from a person who has scoured screen steps for the exact same thing...
(These are just examples)
Code:
//First declare the joystick somewhere as a pointer
frc::Joystick* controller;
Then,
Code:
//Make a bool and assign it to the controllers button in Telop
bool a;
Code:
//Pretend 1 is A for now
a = controller->GetRawButton(1);
if(a){
motor1->Set(0.5);
}
Now I just gave you examples. You need to put them in the right places though:
Code:
//The bool goes into the robot init
//The joystick definition goes in the private section of the robot class
//And the code to execute it goes in telopPeriodic
|
ONLY IF YOU ARE USING A ITERITIVE!!!