Bumper Coding Issues

We have a code and we want when bumper pressed to do different things however when the bumper is being pressed it runs the first line again. I was thinking we could have a code that said when bumper pressed increase value by one then instead of it being when bumper pressed it would be when value is this number however I am not fully aware of how to do this yet. If you could help me do this or find some other solution it would be appreciated.

Team member ?

Maybe :wink: :wink: just trying to get replies

You should explain what you are hoping will happen with the code and what actually happens, otherwise any advise is just a guess.

I want the first time the bumper is pressed to launch the catapult then pull it back down however the second time the bumper is pressed I would like the back roller to spin. However currently when the bumper is pressed it does both at once How do I fix this?

terminology is important, the only bumper sensor I see is here, is this what you are talking about ?

or are you really asking about a touchLED ?

there’s a lot of code here that makes no sense at all.

I guess you want something like this.

1 Like

Sorry this is what I meant to upload partner changed code without me realizing I did mean bumper

Yes kind of but we need when bumper pressed increase touchstate by 1

The broadcast is messing up your code