What Are The Steps To Program A Button Sensor

I have looked all over the forum and cannot seem to find all steps to program a button sensor. Would someone walk me through how to program a button sensor? Thanks!

What do you want to do with it?

1 Like

Go to Library.vex.com you will find kb articles for most every VEX products available including tutorials for coding in different coding environment (but not all).


I would suggest reading the tutorials on Vex’s website. If you are programming in C++ another great option is the API. A quick google search will bring you answers. They are also plenty of docs that people have made. I would not suggest posting a question if you have ONLY looked at the forum. Research on your own for a solid amount of time.

C++ API: VEX V5 C++ API: Main Page


Basically I’m building a catapult for Over Under and I’m using a button sensor to help the motor to stop at the correct place. When I shoot my catapult, I basically want the motor to turn the catapult until it triggers the button sensor so the motor knows when to stop.

You might find it less work to just have the catapult move one revolution instead of until it hits the button. If you have a gear ratio, just change the amount of degrees to account for that.