Anyone have a section of code that either has a button pressed to slow something down on the controller or anything about button sensors and vision sensors

Anything please anything that helps me learn how to code sensors and or a button slowing something down

In seasons past, our kids have added code to the controller to be able to press a button and have it modify drive speed, and indicate either fast mode or slow mode via Touch LED.

I would recommend looking at example code within VexCode for controller programs, and start experimenting with a simple drivebase. The controller usually looks for a stick range -100 to +100, with zero being released/middle. The controller demos use that value to drive motor velocity.

Think about how you can use some math to change how you want the stick position to apply, and give it a try!

4 Likes

If you’re using the graphical configuration buttons for controller drive programming, it will be very difficult. If you aren’t, post your code and we’ll help you modify it.

1 Like

so thats the thing i dont have any code so im trying to see if anyone can show me some of their code

Before you ask people to give you code, please try to start with something. There are plenty of instructions for making drive codes, so how about you make a drive code for your preferred style of driving. After you make one, post it here, and we’ll help you add the button to go slower.

4 Likes