Why does the pressing button compile, but the pressed dosen't?

So, I was coding a button for our robot, and i need it to be “pressed”. But when i do this it gives me a error, it dosen’t give an error if the code says pressing, why is that?
Capture.PNG

This is the error
Capture1.PNG

Pressed takes a function as a parameter and just sets that to be called when the button is pressed

Pressing checks if it is pressed

so how do i fix this?

Change it to pressing

but would that still work if i just quickly press it?

like would it turn 180 degrees?

Yes

ok thanks :slight_smile:

Or if you want to use pressed you would have to do something like this


void spinMotor(){
   MotoryClawie.setVelocity(50, vex::velocityUnits::pct);
   MotoryClawie.rotateFor(180, vex::rotationUnits::deg);
}

Controller1.ButtonR1.pressed( spinMotor );