Button.pressed Help

I would like to know how to use button. Pressed, and no button pressing will not work.

Use it to sense if the button is pressed.

For example using it to move motors

if (Controller1.ButtonUp.pressing() ) {

LeftMoter.spin():
RightMotor.spin();

}else {

LeftMoter.stop():
RightMotor.stop();

}

2 Likes